org.mortbay.jetty.servlet
Class FilterHolder

java.lang.Object
  extended byjava.util.AbstractMap
      extended byorg.mortbay.jetty.servlet.Holder
          extended byorg.mortbay.jetty.servlet.FilterHolder
All Implemented Interfaces:
LifeCycle, java.util.Map, java.io.Serializable

public class FilterHolder
extends Holder

Version:
$Id: FilterHolder.java,v 1.28 2004/11/25 13:27:03 gregwilkins Exp $
Author:
Greg Wilkins
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
static int __ALL
           
static int __DEFAULT
           
static int __ERROR
           
static int __FORWARD
           
static int __INCLUDE
           
static int __REQUEST
           
 
Constructor Summary
FilterHolder()
          Constructor for Serialization.
FilterHolder(HttpHandler httpHandler, java.lang.String name, java.lang.String className)
           
 
Method Summary
 java.lang.String dump()
           
 Filter getFilter()
           
 void start()
          Start the LifeCycle.
 void stop()
          Stop the LifeCycle.
 java.lang.String toString()
           
static int type(java.lang.String type)
           
 void xaddDispatchesToPathSpec(java.lang.String pathSpec, java.lang.String type)
          Add a type that this filter applies to.
 void xaddDispatchesToServlet(java.lang.String name, java.lang.String type)
          Add a type that this filter applies to.
 void xaddPathSpec(java.lang.String pathSpec)
          Add A path spec that this filter applies to.
 void xaddServlet(java.lang.String servlet)
          Add A servlet that this filter applies to.
 boolean xappliesToPath(java.lang.String path, int type)
          Check if this filter applies to a path.
 boolean xappliesToServlet(java.lang.String name, int type)
          Check if this filter applies to a servlet.
 java.lang.String[] xgetPaths()
           
 java.lang.String[] xgetServlets()
           
 boolean xisMappedToPath()
           
 
Methods inherited from class org.mortbay.jetty.servlet.Holder
entrySet, get, getClassName, getDisplayName, getHttpContext, getHttpHandler, getInitParameter, getInitParameterNames, getInitParameters, getName, isStarted, newInstance, put, setDisplayName, setInitParameter
 
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

__DEFAULT

public static final int __DEFAULT
See Also:
Constant Field Values

__REQUEST

public static final int __REQUEST
See Also:
Constant Field Values

__FORWARD

public static final int __FORWARD
See Also:
Constant Field Values

__INCLUDE

public static final int __INCLUDE
See Also:
Constant Field Values

__ERROR

public static final int __ERROR
See Also:
Constant Field Values

__ALL

public static final int __ALL
See Also:
Constant Field Values
Constructor Detail

FilterHolder

public FilterHolder()
Constructor for Serialization.


FilterHolder

public FilterHolder(HttpHandler httpHandler,
                    java.lang.String name,
                    java.lang.String className)
Method Detail

type

public static int type(java.lang.String type)

xaddDispatchesToServlet

public void xaddDispatchesToServlet(java.lang.String name,
                                    java.lang.String type)
Add a type that this filter applies to.

Parameters:
type - "REQUEST", "FORWARD", "INCLUDE" or "ERROR"

xaddDispatchesToPathSpec

public void xaddDispatchesToPathSpec(java.lang.String pathSpec,
                                     java.lang.String type)
Add a type that this filter applies to.

Parameters:
type - "REQUEST", "FORWARD", "INCLUDE" or "ERROR"

xaddServlet

public void xaddServlet(java.lang.String servlet)
Add A servlet that this filter applies to.

Parameters:
servlet -

xaddPathSpec

public void xaddPathSpec(java.lang.String pathSpec)
Add A path spec that this filter applies to.

Parameters:
pathSpec -

xisMappedToPath

public boolean xisMappedToPath()

xappliesToPath

public boolean xappliesToPath(java.lang.String path,
                              int type)
Check if this filter applies to a path.

Parameters:
path - The path to check.
type - The type of request: __REQUEST,__FORWARD,__INCLUDE or __ERROR.
Returns:
True if this filter applies

xappliesToServlet

public boolean xappliesToServlet(java.lang.String name,
                                 int type)
Check if this filter applies to a servlet.

Parameters:
type - The type of request: __REQUEST,__FORWARD,__INCLUDE or __ERROR.
Returns:
True if this filter applies

start

public void start()
           throws java.lang.Exception
Description copied from interface: LifeCycle
Start the LifeCycle.

Specified by:
start in interface LifeCycle
Overrides:
start in class Holder
Throws:
java.lang.Exception

stop

public void stop()
Description copied from interface: LifeCycle
Stop the LifeCycle. The LifeCycle may wait for current activities to complete normally, but it can be interrupted.

Specified by:
stop in interface LifeCycle
Overrides:
stop in class Holder

getFilter

public Filter getFilter()

xgetPaths

public java.lang.String[] xgetPaths()

xgetServlets

public java.lang.String[] xgetServlets()

toString

public java.lang.String toString()
Overrides:
toString in class Holder

dump

public java.lang.String dump()


Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.