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()
      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 this Servlet is currently 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.