Class Tomcat.ExistingStandardWrapper

All Implemented Interfaces:
MBeanRegistration, NotificationBroadcaster, NotificationEmitter, ServletConfig, Container, JmxEnabled, Lifecycle, Wrapper
Enclosing class:
Tomcat

public static class Tomcat.ExistingStandardWrapper extends StandardWrapper
Helper class for wrapping existing servlets. This disables servlet lifecycle and normal reloading, but also reduces overhead and provide more direct control over the servlet.
  • Constructor Details

    • ExistingStandardWrapper

      public ExistingStandardWrapper(Servlet existing)
  • Method Details

    • loadServlet

      public Servlet loadServlet() throws ServletException
      Description copied from class: StandardWrapper
      Load and initialize an instance of this servlet, if there is not already at least one initialized instance. This can be used, for example, to load servlets that are marked in the deployment descriptor to be loaded at server startup time.
      Overrides:
      loadServlet in class StandardWrapper
      Returns:
      the loaded Servlet instance
      Throws:
      ServletException - for a Servlet load error
    • getAvailable

      public long getAvailable()
      Description copied from class: StandardWrapper
      Return the available date/time for this servlet, in milliseconds since the epoch. If this date/time is Long.MAX_VALUE, it is considered to mean that unavailability is permanent and any request for this servlet will return an SC_NOT_FOUND error. If this date/time is in the future, any request for this servlet will return an SC_SERVICE_UNAVAILABLE error. If it is zero, the servlet is currently available.
      Specified by:
      getAvailable in interface Wrapper
      Overrides:
      getAvailable in class StandardWrapper
      Returns:
      the available date/time for this servlet, in milliseconds since the epoch. If this date/time is in the future, any request for this servlet will return an SC_SERVICE_UNAVAILABLE error. If it is zero, the servlet is currently available. A value equal to Long.MAX_VALUE is considered to mean that unavailability is permanent.
    • isUnavailable

      public boolean isUnavailable()
      Specified by:
      isUnavailable in interface Wrapper
      Overrides:
      isUnavailable in class StandardWrapper
      Returns:
      true if the Servlet has been marked unavailable.
    • getServlet

      public Servlet getServlet()
      Specified by:
      getServlet in interface Wrapper
      Overrides:
      getServlet in class StandardWrapper
      Returns:
      the associated servlet instance.
    • getServletClass

      public String getServletClass()
      Specified by:
      getServletClass in interface Wrapper
      Overrides:
      getServletClass in class StandardWrapper
      Returns:
      the fully qualified servlet class name for this servlet.