org.apache.catalina.startup
Class Tomcat.ExistingStandardWrapper

java.lang.Object
  extended by org.apache.catalina.core.ContainerBase
      extended by org.apache.catalina.core.StandardWrapper
          extended by org.apache.catalina.startup.Tomcat.ExistingStandardWrapper
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, javax.servlet.ServletConfig, Container, Lifecycle, Pipeline, 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
 
Field Summary
 
Fields inherited from class org.apache.catalina.core.StandardWrapper
asyncSupported, available, broadcaster, classLoadTime, classType, classTypeUsedInService, countAllocated, DEFAULT_SERVLET_METHODS, description, dynamic, enabled, facade, info, instance, instancePool, instanceSupport, isJspServlet, jspFile, jspMonitorON, loadOnStartup, loadTime, log, mappings, maxInstances, multipartConfig, nInstances, notificationInfo, parameters, references, runAs, sequenceNumber, servletClass, servletInstance, servletSecurity, singleThreadModel, swallowOutput, swValve, unloadDelay, unloading
 
Fields inherited from class org.apache.catalina.core.ContainerBase
backgroundProcessorDelay, children, cluster, CONTAINER_ARRAY, controller, domain, initialized, jarRepository, lifecycle, LISTENER_ARRAY, listeners, loader, logger, logName, manager, mserver, name, oname, parent, parentClassLoader, pipeline, realm, resources, sm, startChildren, started, suffix, support, type
 
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_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
 
Constructor Summary
Tomcat.ExistingStandardWrapper(javax.servlet.Servlet existing)
           
 
Method Summary
 long getAvailable()
          Return the available date/time for this servlet, in milliseconds since the epoch.
 boolean isUnavailable()
          Is this servlet currently unavailable?
 javax.servlet.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, addDefaultMapper, addInitParameter, addInstanceListener, addMapping, addNotificationListener, addSecurityReference, allocate, backgroundProcess, deallocate, findInitParameter, findInitParameters, findMappingObject, findMappings, findSecurityReference, findSecurityReferences, getAllDeclaredMethods, getAsyncSupported, getClassLoadTime, getCountAllocated, getDescription, getEnabled, getEngineName, getErrorCount, getFacade, getInfo, getInitParameter, getInitParameterNames, getInstanceSupport, getJspFile, getLoadOnStartup, getLoadOnStartupString, getLoadTime, getMaxInstances, getMaxTime, getMinTime, getMultipartConfig, getNotificationInfo, getProcessingTime, getRequestCount, getRootCause, getRunAs, getServlet, getServletClass, getServletContext, getServletMethods, getServletName, getServletSecurity, incrementErrorCount, isContainerProvidedServlet, isDynamic, isEventProvider, isSingleThreadModel, isStateManageable, isStatisticsProvider, load, registerJMX, removeInitParameter, removeInstanceListener, removeMapping, removeNotificationListener, removeNotificationListener, removeSecurityReference, setAsyncSupported, setAvailable, setDescription, setDynamic, setEnabled, setErrorCount, setJspFile, setLoadOnStartup, setLoadOnStartupString, setLoadTime, setMaxInstances, setMaxTime, setMinTime, setMultipartConfig, setParent, setProcessingTime, setRequestCount, setRunAs, setServlet, setServletClass, setServletName, setServletSecurity, start, stop, toString, unavailable, unload
 
Methods inherited from class org.apache.catalina.core.ContainerBase
addContainerListener, addLifecycleListener, addPropertyChangeListener, addValve, createObjectName, destroy, findChild, findChildren, findContainerListeners, findLifecycleListeners, fireContainerEvent, getBackgroundProcessorDelay, getBasic, getChildren, getCluster, getContainerSuffix, getDomain, getFirst, getJarRepository, getJmxName, getJSR77Suffix, getLoader, getLogger, getManager, getMappingObject, getName, getObjectName, getParent, getParentClassLoader, getParentName, getPipeline, getRealm, getResources, getStartChildren, getType, getValveObjectNames, getValves, init, invoke, isStarted, logName, postDeregister, postRegister, preDeregister, preRegister, removeChild, removeContainerListener, removeLifecycleListener, removePropertyChangeListener, removeValve, setBackgroundProcessorDelay, setBasic, setCluster, setDomain, setJarRepository, setLoader, setManager, setName, setParentClassLoader, setRealm, setResources, setStartChildren, threadStart, threadStop
 
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, getBackgroundProcessorDelay, getCluster, getJarRepository, getLoader, getLogger, getManager, getMappingObject, getName, getObjectName, getParent, getParentClassLoader, getPipeline, getRealm, getResources, invoke, isStarted, removeChild, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCluster, setJarRepository, setLoader, setManager, setName, setParentClassLoader, setRealm, setResources
 

Constructor Detail

Tomcat.ExistingStandardWrapper

public Tomcat.ExistingStandardWrapper(javax.servlet.Servlet existing)
Method Detail

loadServlet

public javax.servlet.Servlet loadServlet()
                                  throws javax.servlet.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:
javax.servlet.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


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