Package org.jboss.modcluster.container
Interface Context
-
- All Known Implementing Classes:
TomcatContext
public interface ContextSPI for a web application context.- Author:
- Paul Ferraro, Radoslav Husar
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddRequestListener(ServletRequestListener requestListener)Registers the specified request listener with this context.voidaddSessionListener(HttpSessionListener sessionListener)Adds the specified session listener to this context.intgetActiveSessionCount()Returns the number of active sessions for this context.HostgetHost()Returns host associated with this context.StringgetPath()Returns the context path.booleanisDistributable()Indicates whether this context is distributable.booleanisStarted()Returns whether this context is started and ready to accept requests.voidremoveRequestListener(ServletRequestListener requestListener)Removes the specified previously registered request listener.voidremoveSessionListener(HttpSessionListener sessionListener)Removes the specified session listener to this context.
-
-
-
Method Detail
-
getHost
Host getHost()
Returns host associated with this context.- Returns:
- host associated with this context
-
getPath
String getPath()
Returns the context path. The root context needs to be represented as an empty string ("").- Returns:
- context path; empty string if it's a root context
-
isStarted
boolean isStarted()
Returns whether this context is started and ready to accept requests.- Returns:
- whether this context is started and ready to accept requests
-
addRequestListener
void addRequestListener(ServletRequestListener requestListener)
Registers the specified request listener with this context. Used for request draining.- Parameters:
requestListener- request listener to register
-
removeRequestListener
void removeRequestListener(ServletRequestListener requestListener)
Removes the specified previously registered request listener.- Parameters:
requestListener- request listener to remove
-
addSessionListener
void addSessionListener(HttpSessionListener sessionListener)
Adds the specified session listener to this context.- Parameters:
sessionListener- a session listener to register
-
removeSessionListener
void removeSessionListener(HttpSessionListener sessionListener)
Removes the specified session listener to this context.- Parameters:
sessionListener- a session listener to remove
-
getActiveSessionCount
int getActiveSessionCount()
Returns the number of active sessions for this context.- Returns:
- the active session count
-
isDistributable
boolean isDistributable()
Indicates whether this context is distributable.- Returns:
- true, if this context distributes sessions, false otherwise
-
-