|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.pool.RecyclableSupport
org.norther.tammi.spray.filter.chain.DefaultFilterChain
public class DefaultFilterChain
A default implementation of HttpFilterChain.
| Constructor Summary | |
|---|---|
DefaultFilterChain()
Constructs a new chain. |
|
DefaultFilterChain(MBeanServer server)
Constructs a new chain with a server. |
|
| Method Summary | |
|---|---|
void |
clearErrors()
Clears throwables from the error stack of this chain. |
boolean |
containsErrors()
Checks whether this chain contains errors. |
void |
dispose()
Disposes the object by setting its disposed flag. |
void |
doFilter(ServletRequest request,
ServletResponse response)
Passes the request and response to the next filter. |
void |
doFilter(ServletRequest request,
ServletResponse response,
Filter filter)
Invokes the specified filter. |
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterMBeanReference[] filters)
Invokes the first filter in a list of filter handles and continues with the rest as long as the preceding filter passes the request forward. |
Filter |
getCurrentFilter()
Gets the current filter of this chain. |
Pipe |
getCurrentPipe()
Gets the current pipe of this chain. |
Throwable |
getError()
Gets the last throwable from the error stack of this chain. |
List |
getErrors()
Gets a list of all throwables in the error stack of this chain. |
MBeanServer |
getMBeanServer()
Gets the MBean server. |
Filter |
getNearestFilter(Class clazz)
Gets the nearest registered filter of the specified class from the filter stack of this chain. |
Filter |
getNextFilter(Class clazz)
Gets the next registered filter of the specified class in the current pipe to be activated after the current one. |
Filter |
getPreviousFilter(Class clazz)
Gets the previous registered filter of the specified class activated before the current one from the filter stack of this chain. |
List |
getPreviousFilters()
Gets a list of all filters activated before the current one from the filter stack of this chain. |
ServletRequest |
getRequest()
Gets the active request. |
ServletResponse |
getResponse()
Gets the active response. |
boolean |
isInvalidatedSession()
Checks whether the the active session is invalidated. |
Throwable |
popError()
Pops a throwable from the error stack. |
void |
pushError(Throwable error)
Pushes a throwable to the error stack without throwing one. |
void |
recycle(MBeanServer server)
Recycles a chain with a server. |
void |
setInvalidatedSession(boolean flag)
Sets whether the the active session is invalidated. |
void |
terminate()
Terminates the filter chain. |
| Methods inherited from class org.norther.tammi.core.pool.RecyclableSupport |
|---|
isDisposed, recycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultFilterChain()
public DefaultFilterChain(MBeanServer server)
server - the MBean server.| Method Detail |
|---|
public void recycle(MBeanServer server)
server - the MBean server.public void dispose()
RecyclableSupport
dispose in interface Recyclabledispose in class RecyclableSupportpublic ServletRequest getRequest()
HttpFilterChain
getRequest in interface HttpFilterChainpublic ServletResponse getResponse()
HttpFilterChain
getResponse in interface HttpFilterChainpublic boolean isInvalidatedSession()
HttpFilterChain
isInvalidatedSession in interface HttpFilterChainpublic void setInvalidatedSession(boolean flag)
HttpFilterChain
setInvalidatedSession in interface HttpFilterChainflag - true if invalidated, false otherwise.public Pipe getCurrentPipe()
HttpFilterChain
getCurrentPipe in interface HttpFilterChainpublic Filter getCurrentFilter()
HttpFilterChain
getCurrentFilter in interface HttpFilterChainpublic Filter getPreviousFilter(Class clazz)
HttpFilterChain
getPreviousFilter in interface HttpFilterChainclazz - the class or interface of the filter or null for any.
public List getPreviousFilters()
HttpFilterChain
getPreviousFilters in interface HttpFilterChainpublic Filter getNextFilter(Class clazz)
HttpFilterChain
getNextFilter in interface HttpFilterChainclazz - the class or interface of the filter or null for any.
public Filter getNearestFilter(Class clazz)
HttpFilterChain
getNearestFilter in interface HttpFilterChainclazz - the class or interface of the filter or null for any.
public MBeanServer getMBeanServer()
HttpFilterChain
getMBeanServer in interface HttpFilterChainpublic Throwable getError()
HttpFilterChain
getError in interface HttpFilterChainpublic List getErrors()
HttpFilterChain
getErrors in interface HttpFilterChainpublic void pushError(Throwable error)
HttpFilterChain
pushError in interface HttpFilterChainerror - the reason throwable.public Throwable popError()
HttpFilterChain
popError in interface HttpFilterChainpublic boolean containsErrors()
HttpFilterChain
containsErrors in interface HttpFilterChainpublic void clearErrors()
HttpFilterChain
clearErrors in interface HttpFilterChain
public void doFilter(ServletRequest request,
ServletResponse response)
throws ServletException,
IOException
HttpFilterChain
doFilter in interface FilterChaindoFilter in interface HttpFilterChainrequest - the request to pass along in the chain.response - the response to pass along in the chain.
ServletException - for servlet errors.
IOException - for general errors.
public void doFilter(ServletRequest request,
ServletResponse response,
Filter filter)
throws ServletException,
IOException
HttpFilterChain
doFilter in interface HttpFilterChainrequest - the request to pass along in the chain.response - the response to pass along in the chain.filter - the filter to invoke.
ServletException - for servlet errors.
IOException - for general errors.
public void doFilter(ServletRequest request,
ServletResponse response,
FilterMBeanReference[] filters)
throws ServletException,
IOException
HttpFilterChain
doFilter in interface HttpFilterChainrequest - the request to pass along in the chain.response - the response to pass along in the chain.filters - an array of filter references.
ServletException - for servlet errors.
IOException - for general errors.public void terminate()
HttpFilterChain
terminate in interface HttpFilterChain
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||