Class TomcatContext
java.lang.Object
org.jboss.modcluster.container.tomcat.TomcatContext
- All Implemented Interfaces:
Context
Context implementation that wraps a Context.- Author:
- Paul Ferraro, Radoslav Husar
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.catalina.Contextprotected final Hostprotected final TomcatRegistry -
Constructor Summary
ConstructorsConstructorDescriptionTomcatContext(TomcatRegistry registry, org.apache.catalina.Context context) TomcatContext(TomcatRegistry registry, org.apache.catalina.Context context, RequestListenerValveFactory valveFactory) -
Method Summary
Modifier and TypeMethodDescriptionadaptSessionListener(HttpSessionListener sessionListener) voidaddRequestListener(ServletRequestListener requestListener) Registers the specified request listener with this context.voidaddSessionListener(HttpSessionListener sessionListener) Adds the specified session listener to this context.booleanintReturns the number of active sessions for this context.getHost()Returns host associated with this context.getPath()Returns the context path.inthashCode()booleanIndicates whether this context is distributable.booleanReturns 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.toString()
-
Field Details
-
context
protected final org.apache.catalina.Context context -
host
-
registry
-
-
Constructor Details
-
TomcatContext
public TomcatContext(TomcatRegistry registry, org.apache.catalina.Context context, RequestListenerValveFactory valveFactory) -
TomcatContext
-
-
Method Details
-
getHost
Description copied from interface:ContextReturns host associated with this context. -
getPath
Description copied from interface:ContextReturns the context path. The root context needs to be represented as an empty string (""). -
isStarted
public boolean isStarted()Description copied from interface:ContextReturns whether this context is started and ready to accept requests. -
addRequestListener
Description copied from interface:ContextRegisters the specified request listener with this context. Used for request draining.- Specified by:
addRequestListenerin interfaceContext- Parameters:
requestListener- request listener to register
-
removeRequestListener
Description copied from interface:ContextRemoves the specified previously registered request listener.- Specified by:
removeRequestListenerin interfaceContext- Parameters:
requestListener- request listener to remove
-
getActiveSessionCount
public int getActiveSessionCount()Description copied from interface:ContextReturns the number of active sessions for this context.- Specified by:
getActiveSessionCountin interfaceContext- Returns:
- the active session count
-
isDistributable
public boolean isDistributable()Description copied from interface:ContextIndicates whether this context is distributable.- Specified by:
isDistributablein interfaceContext- Returns:
- true, if this context distributes sessions, false otherwise
-
addSessionListener
Description copied from interface:ContextAdds the specified session listener to this context.- Specified by:
addSessionListenerin interfaceContext- Parameters:
sessionListener- a session listener to register
-
removeSessionListener
Description copied from interface:ContextRemoves the specified session listener to this context.- Specified by:
removeSessionListenerin interfaceContext- Parameters:
sessionListener- a session listener to remove
-
adaptSessionListener
-
equals
-
hashCode
public int hashCode() -
toString
-