Tomcat.ExistingStandardWrapper (Apache Tomcat 7.0.96 API Documentation)

org.apache.catalina.startup

## Class Tomcat.ExistingStandardWrapper

- java.lang.Object
- - org.apache.catalina.util.LifecycleBase
  - - org.apache.catalina.util.LifecycleMBeanBase
    - - org.apache.catalina.core.ContainerBase
      - - org.apache.catalina.core.StandardWrapper
        - - org.apache.catalina.startup.Tomcat.ExistingStandardWrapper

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

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.catalina.core.ContainerBase

      `ContainerBase.ContainerBackgroundProcessor, ContainerBase.PrivilegedAddChild`

    - ### Nested classes/interfaces inherited from interface org.apache.catalina.Lifecycle

      `Lifecycle.SingleUse`

  - ### Field Summary

    - ### Fields inherited from class org.apache.catalina.core.StandardWrapper

      `asyncSupported, available, broadcaster, classLoadTime, classType, classTypeUsedInService, countAllocated, DEFAULT_SERVLET_METHODS, enabled, facade, info, instance, instanceInitialized, instancePool, instanceSupport, isJspServlet, jspMonitorON, loadOnStartup, loadTime, mappings, maxInstances, multipartConfigElement, nInstances, notificationInfo, parameters, references, runAs, sequenceNumber, servletClass, singleThreadModel, swallowOutput, swValve, unloadDelay, unloading`

    - ### Fields inherited from class org.apache.catalina.core.ContainerBase

      `accessLog, backgroundProcessorDelay, children, cluster, listeners, loader, logger, logName, manager, name, parent, parentClassLoader, pipeline, resources, sm, startChildren, startStopExecutor, support`

    - ### Fields inherited from class org.apache.catalina.util.LifecycleMBeanBase

      `mserver`

    - ### Fields inherited from interface org.apache.catalina.Wrapper

      `ADD_MAPPING_EVENT, REMOVE_MAPPING_EVENT`

    - ### Fields inherited from interface org.apache.catalina.Container

      `ADD_CHILD_EVENT, ADD_MAPPER_EVENT, ADD_VALVE_EVENT, REMOVE_CHILD_EVENT, REMOVE_MAPPER_EVENT, REMOVE_VALVE_EVENT`

    - ### Fields inherited from interface org.apache.catalina.Lifecycle

      `AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Tomcat.ExistingStandardWrapper(Servlet existing)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getAvailable()` Return the available date/time for this servlet, in milliseconds since the epoch.
    `Servlet` | `getServlet()` Return the associated servlet instance.
    `java.lang.String` | `getServletClass()` Return the fully qualified servlet class name for this servlet.
    `boolean` | `isUnavailable()` Is this servlet currently unavailable?
    `Servlet` | `loadServlet()` Load and initialize an instance of this servlet, if there is not already at least one initialized instance.

    - ### Methods inherited from class org.apache.catalina.core.StandardWrapper

      `addChild, addInitParameter, addInstanceListener, addMapping, addNotificationListener, addSecurityReference, allocate, backgroundProcess, deallocate, findInitParameter, findInitParameters, findMappingObject, findMappings, findSecurityReference, findSecurityReferences, getAllDeclaredMethods, getClassLoadTime, getCountAllocated, getErrorCount, getInfo, getInitParameter, getInitParameterNames, getInstanceSupport, getLoadOnStartup, getLoadOnStartupString, getLoadTime, getMaxInstances, getMaxTime, getMinTime, getMultipartConfigElement, getNotificationInfo, getObjectNameKeyProperties, getProcessingTime, getRequestCount, getRootCause, getRunAs, getServletContext, getServletMethods, getServletName, incrementErrorCount, isAsyncSupported, isContainerProvidedServlet, isEnabled, isEventProvider, isOverridable, isSingleThreadModel, isStateManageable, isStatisticsProvider, load, removeInitParameter, removeInstanceListener, removeMapping, removeNotificationListener, removeNotificationListener, removeSecurityReference, servletSecurityAnnotationScan, setAsyncSupported, setAvailable, setEnabled, setErrorCount, setLoadOnStartup, setLoadOnStartupString, setLoadTime, setMaxInstances, setMaxTime, setMinTime, setMultipartConfigElement, setOverridable, setParent, setProcessingTime, setRequestCount, setRunAs, setServlet, setServletClass, setServletName, setServletSecurityAnnotationScanRequired, startInternal, stopInternal, toString, unavailable, unload`

    - ### Methods inherited from class org.apache.catalina.core.ContainerBase

      `addContainerListener, addPropertyChangeListener, addValve, destroyInternal, findChild, findChildren, findContainerListeners, fireContainerEvent, getAccessLog, getBackgroundProcessorDelay, getChildren, getCluster, getClusterInternal, getDomainInternal, getLoader, getLoaderInternal, getLogger, getManager, getManagerInternal, getMappingObject, getName, getParent, getParentClassLoader, getPipeline, getRealm, getRealmInternal, getResources, getResourcesInternal, getStartChildren, getStartStopThreads, initInternal, invoke, logAccess, logName, removeChild, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCluster, setLoader, setManager, setName, setParentClassLoader, setRealm, setResources, setStartChildren, setStartStopThreads, threadStart, threadStop`

    - ### Methods inherited from class org.apache.catalina.util.LifecycleMBeanBase

      `getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister`

    - ### Methods inherited from class org.apache.catalina.util.LifecycleBase

      `addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, removeLifecycleListener, setState, setState, start, stop`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.catalina.Container

      `addContainerListener, addPropertyChangeListener, findChild, findChildren, findContainerListeners, fireContainerEvent, getAccessLog, getBackgroundProcessorDelay, getCluster, getLoader, getLogger, getManager, getMappingObject, getName, getObjectName, getParent, getParentClassLoader, getPipeline, getRealm, getResources, getStartStopThreads, invoke, logAccess, removeChild, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCluster, setLoader, setManager, setName, setParentClassLoader, setRealm, setResources, setStartStopThreads`

    - ### Methods inherited from interface org.apache.catalina.Lifecycle

      `addLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop`

- - ### Constructor Detail

    - #### Tomcat.ExistingStandardWrapper

          public Tomcat.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`
      Throws:
        `ServletException`

    - #### 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`

    - #### isUnavailable

          public boolean isUnavailable()

      Description copied from class: `StandardWrapper`
      Is this servlet currently unavailable?
      Specified by:
        `isUnavailable` in interface `Wrapper`
      Overrides:
        `isUnavailable` in class `StandardWrapper`

    - #### getServlet

          public Servlet getServlet()

      Description copied from class: `StandardWrapper`
      Return the associated servlet instance.
      Specified by:
        `getServlet` in interface `Wrapper`
      Overrides:
        `getServlet` in class `StandardWrapper`

    - #### getServletClass

          public java.lang.String getServletClass()

      Description copied from class: `StandardWrapper`
      Return the fully qualified servlet class name for this servlet.
      Specified by:
        `getServletClass` in interface `Wrapper`
      Overrides:
        `getServletClass` in class `StandardWrapper`

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.