|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restafarian.core.filters.FilterBase
public abstract class FilterBase
This is the base class for all servlet filters.
| Field Summary | |
|---|---|
protected javax.servlet.ServletContext |
context
|
protected org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
|---|---|
FilterBase()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Filter destroy method. |
abstract void |
doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
Filter "do filter" method. |
void |
init(javax.servlet.FilterConfig config)
Filter init method. |
protected void |
sendError(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
int errorCode,
java.lang.String errorMessage)
Sends the HTTP error code and message, and logs the code and message if enabled. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected javax.servlet.ServletContext context
protected org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public FilterBase()
| Method Detail |
|---|
public abstract void doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
throws javax.servlet.ServletException,
java.io.IOException
Filter "do filter" method.
doFilter in interface javax.servlet.Filterreq - the servlet request objectres - the servlet response objectchain - the filter chain object
javax.servlet.ServletException
java.io.IOException
protected void sendError(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
int errorCode,
java.lang.String errorMessage)
throws java.io.IOException
Sends the HTTP error code and message, and logs the code and message if enabled.
req - the HttpServletRequest objectres - the HttpServletResponse objecterrorCode - the error code to senderrorMessage - the error message to send
java.io.IOExceptionpublic void init(javax.servlet.FilterConfig config)
Filter init method.
init in interface javax.servlet.Filterconfig - the FilterConfig objectpublic void destroy()
Filter destroy method.
destroy in interface javax.servlet.Filter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||