|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbb.servlet.AbstractFilter
public abstract class AbstractFilter
This abstract filter class implements some functionality that will likely be common to all filters:
a filterConfig
field,
as well as init
, destroy
, and toString
methods.
The doFilter
method is left for concrete subclasses to implement.
This class is multithread safe: its only state is the filterConfig
field which is declared volatile.
Field Summary | |
---|---|
protected FilterConfig |
filterConfig
The filter configuration object we are associated with. |
Constructor Summary | |
---|---|
AbstractFilter()
|
Method Summary | |
---|---|
void |
destroy()
Takes this filter out of service. |
abstract void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
To be implemented by a concrete subclass. |
void |
init(FilterConfig filterConfig)
Places this filter into service. |
String |
toString()
Returns a String representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected volatile FilterConfig filterConfig
Constructor Detail |
---|
public AbstractFilter()
Method Detail |
---|
public void init(FilterConfig filterConfig) throws ServletException
init
in interface Filter
filterConfig
- The filter configuration object
ServletException
public void destroy()
destroy
in interface Filter
public abstract void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
doFilter
in interface Filter
request
- The servlet request we are processingresponse
- The servlet response we are creatingchain
- The filter chain we are processing
IOException
- if an input/output error occurs
ServletException
- if a servlet error occurspublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |