Class TomcatContext
- java.lang.Object
-
- org.jboss.modcluster.container.tomcat.TomcatContext
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.catalina.Contextcontextprotected Hosthostprotected TomcatRegistryregistry
-
Constructor Summary
Constructors Constructor Description TomcatContext(TomcatRegistry registry, org.apache.catalina.Context context)TomcatContext(TomcatRegistry registry, org.apache.catalina.Context context, RequestListenerValveFactory valveFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectadaptSessionListener(HttpSessionListener sessionListener)voidaddRequestListener(ServletRequestListener requestListener)Registers the specified request listener with this context.voidaddSessionListener(HttpSessionListener sessionListener)Adds the specified session listener to this context.booleanequals(Object object)intgetActiveSessionCount()Returns the number of active sessions for this context.HostgetHost()Returns host associated with this context.StringgetPath()Returns the context path.inthashCode()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.StringtoString()
-
-
-
Field Detail
-
context
protected final org.apache.catalina.Context context
-
host
protected final Host host
-
registry
protected final TomcatRegistry registry
-
-
Constructor Detail
-
TomcatContext
public TomcatContext(TomcatRegistry registry, org.apache.catalina.Context context, RequestListenerValveFactory valveFactory)
-
TomcatContext
public TomcatContext(TomcatRegistry registry, org.apache.catalina.Context context)
-
-
Method Detail
-
getHost
public Host getHost()
Description copied from interface:ContextReturns host associated with this context.
-
getPath
public String 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
public void addRequestListener(ServletRequestListener requestListener)
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
public void removeRequestListener(ServletRequestListener requestListener)
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
public void addSessionListener(HttpSessionListener sessionListener)
Description copied from interface:ContextAdds the specified session listener to this context.- Specified by:
addSessionListenerin interfaceContext- Parameters:
sessionListener- a session listener to register
-
removeSessionListener
public void removeSessionListener(HttpSessionListener sessionListener)
Description copied from interface:ContextRemoves the specified session listener to this context.- Specified by:
removeSessionListenerin interfaceContext- Parameters:
sessionListener- a session listener to remove
-
adaptSessionListener
public Object adaptSessionListener(HttpSessionListener sessionListener)
-
-