## org.mortbay.jetty.servlet
Class FilterHolder

    java.lang.Object
      |
      +--java.util.AbstractMap
            |
            +--org.mortbay.jetty.servlet.Holder
                  |
                  +--org.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.20 2003/04/26 11:46:43 gregwilkins Exp $
Author:
  Greg Wilkins
See Also:
  Serialized Form

Field Summary
`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
`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.
`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()`
`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, 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

### __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

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)

### addAppliesTo

    public void addAppliesTo(int type)

  Add a type that this filter applies to.

  Parameters:
    `type` - Of __REQUEST, __FORWARD, __INCLUDE or __ERROR

### addAppliesTo

    public void addAppliesTo(java.lang.String type)

  Add a type that this filter applies to.

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

### addServlet

    public void addServlet(java.lang.String servlet)

  Add A servlet that this filter applies to.

  Parameters:
    `servlet` -

### addPathSpec

    public void addPathSpec(java.lang.String pathSpec)

  Add A path spec that this filter applies to.

  Parameters:
    `pathSpec` -

### isMappedToPath

    public boolean isMappedToPath()

### appliesTo

    public boolean appliesTo(int type)

  Check if this filter applies.

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

### appliesTo

    public boolean appliesTo(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

### appliedPathSpec

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

### 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` - An arbitrary exception may be thrown.

### 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()

### getPaths

    public java.lang.String[] getPaths()

### getServlets

    public java.lang.String[] getServlets()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `Holder`

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