Class TomcatEmbeddedContext

java.lang.Object
org.apache.catalina.util.LifecycleBase
org.apache.catalina.util.LifecycleMBeanBase
org.apache.catalina.core.ContainerBase
org.apache.catalina.core.StandardContext
org.springframework.boot.tomcat.TomcatEmbeddedContext
All Implemented Interfaces:
MBeanRegistration, NotificationBroadcaster, NotificationEmitter, org.apache.catalina.Container, org.apache.catalina.Context, org.apache.catalina.JmxEnabled, org.apache.catalina.Lifecycle, org.apache.tomcat.ContextBind

public class TomcatEmbeddedContext extends org.apache.catalina.core.StandardContext
Tomcat StandardContext used by TomcatWebServer to support deferred initialization.
Since:
4.0.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    Strategy interface that can be used to rethrow deferred startup exceptions.

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

    org.apache.catalina.core.ContainerBase.ContainerBackgroundProcessor, org.apache.catalina.core.ContainerBase.ContainerBackgroundProcessorMonitor

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

    org.apache.catalina.Lifecycle.SingleUse
  • Field Summary

    Fields inherited from class org.apache.catalina.core.StandardContext

    allowCasualMultipartParsing, context, DEFAULT_NAMING_LISTENER, manager, threadBindingListener

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

    accessLog, backgroundProcessorDelay, backgroundProcessorFuture, children, cluster, listeners, logger, logName, monitorFuture, name, parent, parentClassLoader, pipeline, sm, startChildren, startStopExecutor, support

    Fields inherited from interface org.apache.catalina.Container

    ADD_CHILD_EVENT, ADD_VALVE_EVENT, REMOVE_CHILD_EVENT, REMOVE_VALVE_EVENT

    Fields inherited from interface org.apache.catalina.Context

    ADD_WELCOME_FILE_EVENT, CHANGE_SESSION_ID_EVENT, CLEAR_WELCOME_FILES_EVENT, REMOVE_WELCOME_FILE_EVENT, WEBAPP_PROTOCOL

    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
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable String
     
     
    boolean
    loadOnStartup(org.apache.catalina.Container[] children)
     
    void
    Set the a strategy used to capture and rethrow deferred startup exceptions.
    void
    setManager(org.apache.catalina.Manager manager)
     
    void
    setMimeMappings(org.springframework.boot.web.server.MimeMappings mimeMappings)
     

    Methods inherited from class org.apache.catalina.core.StandardContext

    addApplicationEventListener, addApplicationLifecycleListener, addApplicationListener, addApplicationParameter, addChild, addConstraint, addErrorPage, addFilterDef, addFilterMap, addFilterMapBefore, addLocaleEncodingMappingParameter, addMessageDestination, addMimeMapping, addNotificationListener, addParameter, addPostConstructMethod, addPreDestroyMethod, addRoleMapping, addSecurityRole, addServletContainerInitializer, addServletMappingDecoded, addServletSecurity, addWatchedResource, addWelcomeFile, addWrapperLifecycle, addWrapperListener, adjustURLPattern, backgroundProcess, bind, bind, bindThread, createInstanceManager, createWrapper, decrementInProgressAsyncCount, destroyInternal, dynamicServletCreated, filterStart, filterStop, findApplicationListeners, findApplicationParameters, findConstraints, findErrorPage, findErrorPage, findErrorPages, findFilterConfig, findFilterDef, findFilterDefs, findFilterMaps, findMessageDestination, findMessageDestinations, findParameter, findParameters, findPostConstructMethod, findPostConstructMethods, findPreDestroyMethod, findPreDestroyMethods, findRoleMapping, findSecurityRole, findSecurityRoles, findServletMapping, findServletMappings, findWatchedResources, findWelcomeFile, findWelcomeFiles, findWrapperLifecycles, findWrapperListeners, fireRequestDestroyEvent, fireRequestInitEvent, getAddWebinfClassesResources, getAllowCasualMultipartParsing, getAllowMultipleLeadingForwardSlashInPath, getAltDDName, getAlwaysAccessSession, getAntiResourceLocking, getApplicationEventListeners, getApplicationLifecycleListeners, getAuthenticator, getBaseName, getCharset, getCharsetMapper, getCharsetMapperClass, getClearReferencesHttpClientKeepAliveThread, getClearReferencesRmiTargets, getClearReferencesStopThreads, getClearReferencesStopTimerThreads, getClearReferencesThreadLocals, getComputedFailCtxIfServletStartFails, getConfigFile, getConfigured, getContainerSciFilter, getContextGetResourceRequiresSlash, getCookieProcessor, getCookies, getCopyXML, getCreateUploadTargets, getCrossContext, getDefaultContextXml, getDefaultWebXml, getDelegate, getDenyUncoveredHttpMethods, getDispatchersUseEncodedPaths, getDispatcherWrapsSameObject, getDisplayName, getDistributable, getDocBase, getEffectiveMajorVersion, getEffectiveMinorVersion, getEncodedPath, getEncodedReverseSolidusHandling, getEncodedReverseSolidusHandlingEnum, getEncodedSolidusHandling, getEncodedSolidusHandlingEnum, getErrorCount, getFailCtxIfServletStartFails, getFireRequestListenersOnForwards, getIgnoreAnnotations, getInProgressAsyncCount, getInstanceManager, getJ2EEApplication, getJ2EEServer, getJarScanner, getJndiExceptionOnFailedWrite, getJspConfigDescriptor, getLoader, getLogEffectiveWebXml, getLoginConfig, getManager, getMapperContextRootRedirectEnabled, getMapperDirectoryRedirectEnabled, getMaxTime, getMetadataComplete, getMinTime, getNamingContextListener, getNamingResources, getNamingToken, getNotFoundClassResourceCacheSize, getNotificationInfo, getObjectNameKeyProperties, getOriginalDocBase, getOverride, getParallelAnnotationScanning, getParentClassLoader, getPath, getPaused, getPreemptiveAuthentication, getPrivileged, getProcessingTime, getPublicId, getRealPath, getReloadable, getRenewThreadsWhenStoppingContext, getRequestCharacterEncoding, getRequestCount, getResourceOnlyServlets, getResources, getResponseCharacterEncoding, getSendRedirectBody, getServer, getServletContext, getSessionCookieDomain, getSessionCookieName, getSessionCookiePath, getSessionCookiePathUsesTrailingSlash, getSessionTimeout, getSkipMemoryLeakChecksOnJvmShutdown, getStartTime, getStartupTime, getSuspendWrappedResponseAfterForward, getSwallowAbortedUploads, getSwallowOutput, getThreadBindingListener, getTldScanTime, getTldValidation, getUnloadDelay, getUnpackWAR, getUseHttpOnly, getUsePartitioned, getUseRelativeRedirects, getValidateClientProvidedNewSessionId, getWebappVersion, getWelcomeFiles, getWorkDir, getWorkPath, getWrapperClass, getXmlBlockExternal, getXmlNamespaceAware, getXmlValidation, incrementInProgressAsyncCount, initInternal, isResourceOnlyServlet, isServlet22, isUseNaming, listenerStart, listenerStop, postWorkDirectory, reload, removeApplicationListener, removeApplicationParameter, removeChild, removeConstraint, removeErrorPage, removeFilterDef, removeFilterMap, removeMessageDestination, removeMimeMapping, removeNotificationListener, removeNotificationListener, removeParameter, removePostConstructMethod, removePreDestroyMethod, removeRoleMapping, removeSecurityRole, removeServletMapping, removeWatchedResource, removeWelcomeFile, removeWrapperLifecycle, removeWrapperListener, resourcesStart, resourcesStop, setAddWebinfClassesResources, setAllowCasualMultipartParsing, setAllowMultipleLeadingForwardSlashInPath, setAltDDName, setAlwaysAccessSession, setAntiResourceLocking, setApplicationEventListeners, setApplicationLifecycleListeners, setCharsetMapper, setCharsetMapperClass, setClearReferencesHttpClientKeepAliveThread, setClearReferencesRmiTargets, setClearReferencesStopThreads, setClearReferencesStopTimerThreads, setClearReferencesThreadLocals, setConfigFile, setConfigured, setContainerSciFilter, setContextGetResourceRequiresSlash, setCookieProcessor, setCookies, setCopyXML, setCreateUploadTargets, setCrossContext, setDefaultContextXml, setDefaultWebXml, setDelegate, setDenyUncoveredHttpMethods, setDispatchersUseEncodedPaths, setDispatcherWrapsSameObject, setDisplayName, setDistributable, setDocBase, setEffectiveMajorVersion, setEffectiveMinorVersion, setEncodedReverseSolidusHandling, setEncodedSolidusHandling, setFailCtxIfServletStartFails, setFireRequestListenersOnForwards, setIgnoreAnnotations, setInstanceManager, setJ2EEApplication, setJ2EEServer, setJarScanner, setJndiExceptionOnFailedWrite, setJspConfigDescriptor, setLoader, setLogEffectiveWebXml, setLoginConfig, setMapperContextRootRedirectEnabled, setMapperDirectoryRedirectEnabled, setMetadataComplete, setNamingContextListener, setNamingResources, setNotFoundClassResourceCacheSize, setOriginalDocBase, setOverride, setParallelAnnotationScanning, setPath, setPreemptiveAuthentication, setPrivileged, setPublicId, setReloadable, setRenewThreadsWhenStoppingContext, setReplaceWelcomeFiles, setRequestCharacterEncoding, setResourceOnlyServlets, setResources, setResponseCharacterEncoding, setSendRedirectBody, setServer, setSessionCookieDomain, setSessionCookieName, setSessionCookiePath, setSessionCookiePathUsesTrailingSlash, setSessionTimeout, setSkipMemoryLeakChecksOnJvmShutdown, setStartupTime, setSuspendWrappedResponseAfterForward, setSwallowAbortedUploads, setSwallowOutput, setThreadBindingListener, setTldScanTime, setTldValidation, setUnloadDelay, setUnpackWAR, setUseHttpOnly, setUseNaming, setUsePartitioned, setUseRelativeRedirects, setValidateClientProvidedNewSessionId, setWebappVersion, setWorkDir, setWrapperClass, setXmlBlockExternal, setXmlNamespaceAware, setXmlValidation, startInternal, stopInternal, unbind, unbind, unbindThread, wasCreatedDynamicServlet

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

    addContainerListener, addPropertyChangeListener, addValve, findChild, findChildren, findContainerListeners, fireContainerEvent, getAccessLog, getBackgroundProcessorDelay, getCatalinaBase, getCatalinaHome, getChildren, getCluster, getClusterInternal, getDomainInternal, getLogger, getLogName, getMBeanKeyProperties, getName, getParent, getPipeline, getRealm, getRealmInternal, getStartChildren, getStartStopThreads, logAccess, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCluster, setName, setParent, setParentClassLoader, setRealm, setStartChildren, setStartStopThreads, threadStart, threadStop, toString

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

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

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

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

    Methods inherited from class 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, getCatalinaBase, getCatalinaHome, getCluster, getDomain, getLogger, getLogName, getMBeanKeyProperties, getName, getObjectName, getParent, getPipeline, getRealm, getStartStopThreads, logAccess, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCluster, setName, setParent, setParentClassLoader, setRealm, setStartStopThreads

    Methods inherited from interface org.apache.catalina.Context

    addServletMappingDecoded, findConfigFileResource

    Methods inherited from interface org.apache.catalina.Lifecycle

    addLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop
  • Constructor Details

    • TomcatEmbeddedContext

      public TomcatEmbeddedContext()
  • Method Details

    • loadOnStartup

      public boolean loadOnStartup(org.apache.catalina.Container[] children)
      Overrides:
      loadOnStartup in class org.apache.catalina.core.StandardContext
    • setManager

      public void setManager(org.apache.catalina.Manager manager)
      Specified by:
      setManager in interface org.apache.catalina.Context
      Overrides:
      setManager in class org.apache.catalina.core.StandardContext
    • setDeferredStartupExceptions

      public void setDeferredStartupExceptions(TomcatEmbeddedContext.DeferredStartupExceptions deferredStartupExceptions)
      Set the a strategy used to capture and rethrow deferred startup exceptions.
      Parameters:
      deferredStartupExceptions - the strategy to use
    • setMimeMappings

      public void setMimeMappings(org.springframework.boot.web.server.MimeMappings mimeMappings)
    • findMimeMappings

      public String[] findMimeMappings()
      Specified by:
      findMimeMappings in interface org.apache.catalina.Context
      Overrides:
      findMimeMappings in class org.apache.catalina.core.StandardContext
    • findMimeMapping

      public @Nullable String findMimeMapping(String extension)
      Specified by:
      findMimeMapping in interface org.apache.catalina.Context
      Overrides:
      findMimeMapping in class org.apache.catalina.core.StandardContext