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
Modifier and TypeClassDescriptionprotected class
static interface
Experimental Wrapper mechanism for Filter objects.static class
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, AbstractLifeCycle.StopException
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
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructorFilterHolder
(Class<? extends javax.servlet.Filter> filter) ConstructorFilterHolder
(javax.servlet.Filter filter) Constructor for existing filter.FilterHolder
(Source source) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected javax.servlet.Filter
void
void
doFilter
(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) void
doStart()
Method to override to start the lifecyclevoid
doStop()
Method to override to stop the lifecyclevoid
dump
(Appendable out, String indent) Dump this object (and children) into an Appendable using the provided indent after any new lines.javax.servlet.Filter
javax.servlet.FilterRegistration.Dynamic
void
Do any setup necessary after startingvoid
setFilter
(javax.servlet.Filter filter) 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, getServletContext, getServletHandler, getSource, illegalStateIfContextStarted, isInstance, setServletHandler, unwrap, wrap
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addEventListener, getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, setEventListeners, start, stop
-
Constructor Details
-
FilterHolder
public FilterHolder()Constructor -
FilterHolder
Constructor- Parameters:
source
- the holder source
-
FilterHolder
Constructor- Parameters:
filter
- the filter class
-
FilterHolder
public FilterHolder(javax.servlet.Filter filter) Constructor for existing filter.- Parameters:
filter
- the filter
-
-
Method Details
-
doStart
Description copied from class:AbstractLifeCycle
Method to override to start the lifecycle- Overrides:
doStart
in classBaseHolder<javax.servlet.Filter>
- Throws:
AbstractLifeCycle.StopException
- If thrown, the lifecycle will immediately be stopped.Exception
- If there was a problem starting. Will cause a transition to FAILED state
-
initialize
Description copied from class:BaseHolder
Do any setup necessary after starting- Overrides:
initialize
in classBaseHolder<javax.servlet.Filter>
- Throws:
Exception
- if unable to initialize
-
createInstance
- Overrides:
createInstance
in classBaseHolder<javax.servlet.Filter>
- Throws:
Exception
-
doStop
Description copied from class:AbstractLifeCycle
Method to override to stop the lifecycle- Overrides:
doStop
in classBaseHolder<javax.servlet.Filter>
- Throws:
Exception
- If there was a problem stopping. Will cause a transition to FAILED state
-
destroyInstance
- 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 IOException, javax.servlet.ServletException - Throws:
IOException
javax.servlet.ServletException
-
dump
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:
IOException
- if unable to write to Appendable
-
toString
-
getRegistration
public javax.servlet.FilterRegistration.Dynamic getRegistration()
-