Class TomcatContext

java.lang.Object
org.jboss.modcluster.container.tomcat.TomcatContext
All Implemented Interfaces:
Context

public class TomcatContext extends Object implements Context
Context implementation that wraps a Context.
Author:
Paul Ferraro, Radoslav Husar
  • Field Details

    • context

      protected final org.apache.catalina.Context context
    • host

      protected final Host host
    • registry

      protected final TomcatRegistry registry
  • Constructor Details

  • Method Details

    • getHost

      public Host getHost()
      Description copied from interface: Context
      Returns host associated with this context.
      Specified by:
      getHost in interface Context
      Returns:
      host associated with this context
    • getPath

      public String getPath()
      Description copied from interface: Context
      Returns the context path. The root context needs to be represented as an empty string ("").
      Specified by:
      getPath in interface Context
      Returns:
      context path; empty string if it's a root context
    • isStarted

      public boolean isStarted()
      Description copied from interface: Context
      Returns whether this context is started and ready to accept requests.
      Specified by:
      isStarted in interface Context
      Returns:
      whether this context is started and ready to accept requests
    • addRequestListener

      public void addRequestListener(ServletRequestListener requestListener)
      Description copied from interface: Context
      Registers the specified request listener with this context. Used for request draining.
      Specified by:
      addRequestListener in interface Context
      Parameters:
      requestListener - request listener to register
    • removeRequestListener

      public void removeRequestListener(ServletRequestListener requestListener)
      Description copied from interface: Context
      Removes the specified previously registered request listener.
      Specified by:
      removeRequestListener in interface Context
      Parameters:
      requestListener - request listener to remove
    • getActiveSessionCount

      public int getActiveSessionCount()
      Description copied from interface: Context
      Returns the number of active sessions for this context.
      Specified by:
      getActiveSessionCount in interface Context
      Returns:
      the active session count
    • isDistributable

      public boolean isDistributable()
      Description copied from interface: Context
      Indicates whether this context is distributable.
      Specified by:
      isDistributable in interface Context
      Returns:
      true, if this context distributes sessions, false otherwise
    • addSessionListener

      public void addSessionListener(HttpSessionListener sessionListener)
      Description copied from interface: Context
      Adds the specified session listener to this context.
      Specified by:
      addSessionListener in interface Context
      Parameters:
      sessionListener - a session listener to register
    • removeSessionListener

      public void removeSessionListener(HttpSessionListener sessionListener)
      Description copied from interface: Context
      Removes the specified session listener to this context.
      Specified by:
      removeSessionListener in interface Context
      Parameters:
      sessionListener - a session listener to remove
    • adaptSessionListener

      public Object adaptSessionListener(HttpSessionListener sessionListener)
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object