wt.session
Class SessionContextDestroyer
java.lang.Object
wt.session.SessionContextDestroyer
- All Implemented Interfaces:
- EventListener, javax.servlet.Filter, Filter, javax.servlet.http.HttpSessionListener
- public class SessionContextDestroyer
- extends Object
- implements javax.servlet.http.HttpSessionListener, javax.servlet.Filter, Filter
Method Summary |
void |
destroy()
Called when instance of usage of a given
filter instance has completed. |
void |
doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
FilterChain chain)
Primary method of Filter. |
private static void |
doFilterInternal(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
|
private static String |
getRemoteHost(javax.servlet.http.HttpSession session)
|
private static String |
getServletContextKey(javax.servlet.http.HttpSession session)
|
void |
init(javax.servlet.FilterConfig filterConfig)
|
void |
init(FilterConfig filterConfig)
Called once after instantiation but before
doFilter() is called for a given Filter
instance. |
private static void |
initInternal(javax.servlet.FilterConfig filterConfig)
|
private static void |
rememberRemoteHost(javax.servlet.http.HttpSession session,
String remoteHost)
|
private static boolean |
sessionAttrsStayDuringDestroy(javax.servlet.ServletContext servletContext)
|
void |
sessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent)
|
void |
sessionDestroyed(javax.servlet.http.HttpSessionEvent httpSessionEvent)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SESSION_BASE_KEY
private static final String SESSION_BASE_KEY
- See Also:
- Constant Field Values
SESSION_REMOTE_HOST_KEY
private static final String SESSION_REMOTE_HOST_KEY
- See Also:
- Constant Field Values
SERVLET_CONTEXT_BASE_KEY
private static final String SERVLET_CONTEXT_BASE_KEY
- See Also:
- Constant Field Values
SessionContextDestroyer
public SessionContextDestroyer()
sessionCreated
public void sessionCreated(javax.servlet.http.HttpSessionEvent httpSessionEvent)
- Specified by:
sessionCreated
in interface javax.servlet.http.HttpSessionListener
sessionDestroyed
public void sessionDestroyed(javax.servlet.http.HttpSessionEvent httpSessionEvent)
- Specified by:
sessionDestroyed
in interface javax.servlet.http.HttpSessionListener
getRemoteHost
private static String getRemoteHost(javax.servlet.http.HttpSession session)
rememberRemoteHost
private static void rememberRemoteHost(javax.servlet.http.HttpSession session,
String remoteHost)
getServletContextKey
private static String getServletContextKey(javax.servlet.http.HttpSession session)
sessionAttrsStayDuringDestroy
private static boolean sessionAttrsStayDuringDestroy(javax.servlet.ServletContext servletContext)
doFilter
public void doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
throws IOException,
javax.servlet.ServletException
- Specified by:
doFilter
in interface javax.servlet.Filter
- Throws:
IOException
javax.servlet.ServletException
doFilterInternal
private static void doFilterInternal(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
throws IOException,
javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
init
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
- Specified by:
init
in interface javax.servlet.Filter
- Throws:
javax.servlet.ServletException
initInternal
private static void initInternal(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
destroy
public void destroy()
- Description copied from interface:
Filter
- Called when instance of usage of a given
filter instance has completed.
- Specified by:
destroy
in interface javax.servlet.Filter
doFilter
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
FilterChain chain)
throws IOException,
javax.servlet.ServletException
- Description copied from interface:
Filter
- Primary method of Filter. Called to filter an
incoming request. The filter may handle the
request entirely on its own or pass it on to
the next filter in the chain (note the tail of
the chain includes the original servlet) by calling
chain.doFilter().
- Specified by:
doFilter
in interface Filter
- Parameters:
request
- the incoming requestresponse
- the outgoing responsechain
- the chain of filters after this one
including the original servlet
- Throws:
IOException
- thrown upon IO problems
javax.servlet.ServletException
- thrown upon other
checked-exception problems
init
public void init(FilterConfig filterConfig)
throws javax.servlet.ServletException
- Description copied from interface:
Filter
- Called once after instantiation but before
doFilter() is called for a given Filter
instance.
- Specified by:
init
in interface Filter
- Parameters:
filterConfig
- information about the filter
and configuration parameters
- Throws:
javax.servlet.ServletException
- thrown upon encountering
checked-exception sorts of problems