Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mortbay.jetty.servlet
Class FilterHolder  view FilterHolder download FilterHolder.java

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

public class FilterHolder
extends Holder

Version:
$Id: FilterHolder.java,v 1.22 2003/09/18 13:29:24 gregwilkins Exp $

Nested Class Summary
(package private)  class FilterHolder.Config
           
 
Nested classes inherited from class java.util.AbstractMap
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
static int __ALL
           
static int __ERROR
           
static int __FORWARD
           
static int __INCLUDE
           
static int __REQUEST
           
private  int _appliesTo
           
private  FilterHolder.Config _config
           
private  javax.servlet.Filter _filter
           
private  org.mortbay.http.PathMap _pathSpecs
           
private  java.lang.Object _servlets
           
 
Fields inherited from class org.mortbay.jetty.servlet.Holder
_class, _className, _displayName, _httpHandler, _initParams, _name
 
Fields inherited from class java.util.AbstractMap
 
Constructor Summary
FilterHolder()
          Constructor for Serialization.
FilterHolder(org.mortbay.http.HttpHandler httpHandler, java.lang.String name, java.lang.String className)
           
 
Method Summary
 void addAppliesTo(int type)
          Add a type that this filter applies to.
 void addAppliesTo(java.lang.String type)
          Add a type that this filter applies to.
 void addPathSpec(java.lang.String pathSpec)
          Add A path spec that this filter applies to.
 void addServlet(java.lang.String servlet)
          Add A servlet that this filter applies to.
 java.lang.String appliedPathSpec(java.lang.String path)
           
 boolean appliesTo(int type)
          Check if this filter applies.
 boolean appliesTo(java.lang.String path, int type)
          Check if this filter applies to a path.
 javax.servlet.Filter getFilter()
           
 java.lang.String[] getPaths()
           
 java.lang.String[] getServlets()
           
 boolean isMappedToPath()
           
 void start()
          Start the LifeCycle.
 void stop()
          Stop the LifeCycle.
 java.lang.String toString()
          Returns a String representation of this map.
static int type(java.lang.String type)
           
 
Methods inherited from class org.mortbay.jetty.servlet.Holder
entrySet, get, getClassName, getDisplayName, getHttpHandler, getInitParameter, getInitParameterNames, getInitParameters, getName, isStarted, newInstance, put, setDisplayName, setInitParameter
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

__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

_pathSpecs

private org.mortbay.http.PathMap _pathSpecs

_appliesTo

private int _appliesTo

_servlets

private java.lang.Object _servlets

_filter

private transient javax.servlet.Filter _filter

_config

private transient FilterHolder.Config _config
Constructor Detail

FilterHolder

public FilterHolder()
Constructor for Serialization.


FilterHolder

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

type

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

addAppliesTo

public void addAppliesTo(int type)
Add a type that this filter applies to.


addAppliesTo

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


addServlet

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


addPathSpec

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


isMappedToPath

public boolean isMappedToPath()

appliesTo

public boolean appliesTo(int type)
Check if this filter applies.


appliesTo

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


appliedPathSpec

public java.lang.String appliedPathSpec(java.lang.String path)

start

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

Specified by:
start in interface org.mortbay.util.LifeCycle
Overrides:
start in class Holder

stop

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

Specified by:
stop in interface org.mortbay.util.LifeCycle
Overrides:
stop in class Holder

getFilter

public javax.servlet.Filter getFilter()

getPaths

public java.lang.String[] getPaths()

getServlets

public java.lang.String[] getServlets()

toString

public java.lang.String toString()
Description copied from class: java.util.AbstractMap
Returns a String representation of this map. This is a listing of the map entries (which are specified in Map.Entry as being getKey() + "=" + getValue()), separated by a comma and space (", "), and surrounded by braces ('{' and '}'). This implementation uses a StringBuffer and iterates over the entrySet to build the String. Note that this can fail with an exception if underlying keys or values complete abruptly in toString().

Overrides:
toString in class Holder