Package org.jboss.modcluster.container
Interface Context
-
- All Known Implementing Classes:
TomcatContext
public interface Context
SPI for a web application context.- Author:
- Paul Ferraro, Radoslav Husar
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addRequestListener(ServletRequestListener requestListener)
Registers the specified request listener with this context.void
addSessionListener(HttpSessionListener sessionListener)
Adds the specified session listener to this context.int
getActiveSessionCount()
Returns the number of active sessions for this context.Host
getHost()
Returns host associated with this context.String
getPath()
Returns the context path.boolean
isDistributable()
Indicates whether this context is distributable.boolean
isStarted()
Returns whether this context is started and ready to accept requests.void
removeRequestListener(ServletRequestListener requestListener)
Removes the specified previously registered request listener.void
removeSessionListener(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
-
-