Class Tomcat.ExistingStandardWrapper

  • All Implemented Interfaces:
    ServletConfig, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, 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 Detail

      • ExistingStandardWrapper

        public ExistingStandardWrapper​(Servlet existing)
    • Method Detail

      • 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.