Package org.eclipse.jetty.servlet
Class FilterHolder
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.servlet.BaseHolder<T>
-
- org.eclipse.jetty.servlet.Holder<javax.servlet.Filter>
-
- org.eclipse.jetty.servlet.FilterHolder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
FilterHolder.Registration
static interface
FilterHolder.WrapFunction
Experimental Wrapper mechanism for Filter objects.static class
FilterHolder.Wrapper
-
Nested classes/interfaces inherited from class org.eclipse.jetty.servlet.Holder
Holder.HolderConfig, Holder.HolderRegistration
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Constructor Summary
Constructors Constructor Description FilterHolder()
ConstructorFilterHolder(java.lang.Class<? extends javax.servlet.Filter> filter)
ConstructorFilterHolder(javax.servlet.Filter filter)
Constructor for existing filter.FilterHolder(Source source)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroyInstance(java.lang.Object o)
void
doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
void
doStart()
void
doStop()
void
dump(java.lang.Appendable out, java.lang.String indent)
Dump this object (and children) into an Appendable using the provided indent after any new lines.javax.servlet.Filter
getFilter()
javax.servlet.FilterRegistration.Dynamic
getRegistration()
void
initialize()
Do any setup necessary after startingvoid
setFilter(javax.servlet.Filter filter)
java.lang.String
toString()
-
Methods inherited from class org.eclipse.jetty.servlet.Holder
dump, getDisplayName, getInitParameter, getInitParameterNames, getInitParameters, getName, isAsyncSupported, setAsyncSupported, setClassName, setDisplayName, setHeldClass, setInitParameter, setInitParameters, setInstance, setName
-
Methods inherited from class org.eclipse.jetty.servlet.BaseHolder
getClassName, getHeldClass, getInstance, getServletHandler, getSource, illegalStateIfContextStarted, isInstance, setServletHandler, unwrap, wrap
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
-
-
-
-
Constructor Detail
-
FilterHolder
public FilterHolder()
Constructor
-
FilterHolder
public FilterHolder(Source source)
Constructor- Parameters:
source
- the holder source
-
FilterHolder
public FilterHolder(java.lang.Class<? extends javax.servlet.Filter> filter)
Constructor- Parameters:
filter
- the filter class
-
FilterHolder
public FilterHolder(javax.servlet.Filter filter)
Constructor for existing filter.- Parameters:
filter
- the filter
-
-
Method Detail
-
doStart
public void doStart() throws java.lang.Exception
- Overrides:
doStart
in classBaseHolder<javax.servlet.Filter>
- Throws:
java.lang.Exception
-
initialize
public void initialize() throws java.lang.Exception
Description copied from class:BaseHolder
Do any setup necessary after starting- Overrides:
initialize
in classBaseHolder<javax.servlet.Filter>
- Throws:
java.lang.Exception
- if unable to initialize
-
doStop
public void doStop() throws java.lang.Exception
- Overrides:
doStop
in classBaseHolder<javax.servlet.Filter>
- Throws:
java.lang.Exception
-
destroyInstance
public void destroyInstance(java.lang.Object o)
- Overrides:
destroyInstance
in classHolder<javax.servlet.Filter>
-
setFilter
public void setFilter(javax.servlet.Filter filter)
-
getFilter
public javax.servlet.Filter getFilter()
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
- Throws:
java.io.IOException
javax.servlet.ServletException
-
dump
public void dump(java.lang.Appendable out, java.lang.String indent) throws java.io.IOException
Description copied from interface:Dumpable
Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.- Specified by:
dump
in interfaceDumpable
- Overrides:
dump
in classBaseHolder<javax.servlet.Filter>
- Parameters:
out
- The appendable to dump toindent
- The indent to apply after any new lines.- Throws:
java.io.IOException
- if unable to write to Appendable
-
toString
public java.lang.String toString()
-
getRegistration
public javax.servlet.FilterRegistration.Dynamic getRegistration()
-
-