|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.servlet.filter.Filter
This replaces the BasicTransactionFilter. Also note that the BasicTransactionServlet is no longer used and that it is functionally replaced by implementing the org.apache.tomcat.core.LifecycleInterceptor and org.apache.tomcat.core.ServiceInterceptor. There is no interface defined for this, since this is a temporary halfway point between the old Enhydra TransactionFilter and the future Tomcat Interceptors. Extend this class to create a filter with additional attributes. The object model is not currently very clean because we need to bridge between the Interceptor model of Tomcat for service(), init(), and destroy(), while maintaining the Enhydra request and response wrapping (Valve model).
Constructor Summary | |
Filter()
Default constructor. |
|
Filter(java.lang.String description)
Constructor given a description only. |
Method Summary | |
java.lang.String |
getDescription()
Get the String description for this Filter. |
org.apache.tomcat.core.LifecycleInterceptor |
getDestroyInterceptor()
Get the destroy() LifecycleInterceptor for this Filter. |
org.apache.tomcat.core.LifecycleInterceptor |
getInitInterceptor()
Get the init() LifecycleInterceptor for this Filter. |
org.apache.tomcat.core.ServiceInterceptor |
getServiceInterceptor()
Get the ServiceInterceptor for this Filter. |
void |
registerInterceptors(java.lang.String id)
Adds the service, init, and destroy interceptors to the Tomcat Context for the given servlet. |
void |
setDescription(java.lang.String description)
Set the String description for this Filter. |
void |
setDestroyInterceptor(org.apache.tomcat.core.LifecycleInterceptor destroyInterceptor)
Set the destroy() LifecycleInterceptor for this Filter. |
void |
setInitInterceptor(org.apache.tomcat.core.LifecycleInterceptor initInterceptor)
Set the init() LifecycleInterceptor for this Filter. |
void |
setServiceInterceptor(org.apache.tomcat.core.ServiceInterceptor serviceInterceptor)
Set the ServiceInterceptor for this Filter. |
java.lang.String |
toString()
Override toString since that is what the Admin used to use to get the description. |
void |
unregisterInterceptors(java.lang.String id)
Removes the service, init, and destroy interceptors from the Tomcat Context for the given servlet. |
RequestFilter |
wrapRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get the RequestFilter for this Filter by wrapping the given Request. |
abstract ResponseFilter |
wrapResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get the ResponseFilter for this Filter by wrapping the given Response. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Filter()
public Filter(java.lang.String description)
description
- a String describing the filter, suitable for
a select list.Method Detail |
public void registerInterceptors(java.lang.String id)
id
- The servlet id used to find the Context.public void unregisterInterceptors(java.lang.String id)
id
- The servlet id used to find the Context.public void setDescription(java.lang.String description)
description
- is a String describing the filter.public java.lang.String getDescription()
public java.lang.String toString()
toString
in class java.lang.Object
public RequestFilter wrapRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- an HttpServletRequest to be wrapped by the filter.response
- an HttpServletResponse that is generally not used, but
is available for request-response data coordination.
public abstract ResponseFilter wrapResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- an HttpServletRequest that is generally not used, but
is available for request-response data coordination.response
- an HttpServletResponse to be wrapped by the filter.
public void setServiceInterceptor(org.apache.tomcat.core.ServiceInterceptor serviceInterceptor)
serviceInterceptor
- is a ServiceInterceptorpublic org.apache.tomcat.core.ServiceInterceptor getServiceInterceptor()
public void setInitInterceptor(org.apache.tomcat.core.LifecycleInterceptor initInterceptor)
initInterceptor
- is a LifecycleInterceptor for init()public org.apache.tomcat.core.LifecycleInterceptor getInitInterceptor()
public void setDestroyInterceptor(org.apache.tomcat.core.LifecycleInterceptor destroyInterceptor)
destroyInterceptor
- is a LifecycleInterceptor for destroy()public org.apache.tomcat.core.LifecycleInterceptor getDestroyInterceptor()
|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |