Package com.ibm.websphere.servlet.event
Interface ServletContextEventSource
public interface ServletContextEventSource
This event context is used to register listeners for various servlet context events.
These events will be triggered by the servlet engine as appropriate during servlet
processing. An implementation of this event context is available to all servlets
as a ServletContext attribute by using the ServletContext.getAttribute()
method.
Sample Usage (from within a servlet):
ServletContextEventSource sces = (ServletContextEventSource)getServletContext().getAttribute( ServletContextEventSource.ATTRIBUTE_NAME); sces.addServletErrorListener(myErrorListener);
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The ServletContext attribute name that the servlet context event source can be retrieved using. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Register a listener for application events.void
Register a listener for filter error events.void
Register a listener for filter invocation events.void
Register a listener for filter events.void
Register a listener for servlet error events.void
Register a listener for servlet invocation events.void
Register a listener for servlet events.void
Deregister a listener for application events.void
Deregister a listener for filter error events.void
Deregister a listener for filter invocation events.void
Deregister a listener for filter events.void
Deregister a listener for servlet error events.void
Deregister a listener for servlet invocation events.void
Deregister a listener for servlet events.
-
Field Details
-
ATTRIBUTE_NAME
The ServletContext attribute name that the servlet context event source can be retrieved using.- See Also:
-
-
Method Details
-
addApplicationListener
Register a listener for application events. -
removeApplicationListener
Deregister a listener for application events. -
addServletInvocationListener
Register a listener for servlet invocation events. -
removeServletInvocationListener
Deregister a listener for servlet invocation events. -
addServletErrorListener
Register a listener for servlet error events. -
removeServletErrorListener
Deregister a listener for servlet error events. -
addServletListener
Register a listener for servlet events. -
removeServletListener
Deregister a listener for servlet events. -
addFilterInvocationListener
Register a listener for filter invocation events. -
removeFilterInvocationListener
Deregister a listener for filter invocation events. -
addFilterErrorListener
Register a listener for filter error events. -
removeFilterErrorListener
Deregister a listener for filter error events. -
addFilterListener
Register a listener for filter events. -
removeFilterListener
Deregister a listener for filter events.
-