Package org.apache.catalina.webresources
Class StandardRoot
- java.lang.Object
- 
- org.apache.catalina.util.LifecycleBase
- 
- org.apache.catalina.util.LifecycleMBeanBase
- 
- org.apache.catalina.webresources.StandardRoot
 
 
 
- 
- All Implemented Interfaces:
- javax.management.MBeanRegistration,- JmxEnabled,- Lifecycle,- WebResourceRoot
 - Direct Known Subclasses:
- ExtractingRoot
 
 public class StandardRoot extends LifecycleMBeanBase implements WebResourceRoot Provides the resources implementation for a web application. The Lifecycleof this class should be aligned with that of the associatedContext.This implementation assumes that the base attribute supplied to createWebResourceSet( org.apache.catalina.WebResourceRoot.ResourceSetType, String, String, String, String)represents the absolute path to a file.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.apache.catalina.LifecycleLifecycle.SingleUse
 - 
Nested classes/interfaces inherited from interface org.apache.catalina.WebResourceRootWebResourceRoot.ArchiveIndexStrategy, WebResourceRoot.CacheStrategy, WebResourceRoot.ResourceSetType
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected static StringManagersm- 
Fields inherited from class org.apache.catalina.util.LifecycleMBeanBasemserver
 - 
Fields inherited from interface org.apache.catalina.LifecycleAFTER_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 SummaryConstructors Constructor Description StandardRoot()Creates a new standard implementation ofWebResourceRoot.StandardRoot(Context context)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddClassResources(WebResourceSet webResourceSet)voidaddJarResources(WebResourceSet webResourceSet)Adds the provided WebResourceSet to this web application as a 'Jar' resource.voidaddPostResources(WebResourceSet webResourceSet)Adds the provided WebResourceSet to this web application as a 'Post' resource.voidaddPreResources(WebResourceSet webResourceSet)Adds the provided WebResourceSet to this web application as a 'Pre' resource.voidbackgroundProcess()This method will be invoked by the context on a periodic basis and allows the implementation a method that executes periodic tasks, such as purging expired cache entries.protected WebResourceSetcreateMainResourceSet()voidcreateWebResourceSet(WebResourceRoot.ResourceSetType type, java.lang.String webAppMount, java.lang.String base, java.lang.String archivePath, java.lang.String internalPath)Creates a newWebResourceSetfor thisWebResourceRootbased on the provided parameters.voidcreateWebResourceSet(WebResourceRoot.ResourceSetType type, java.lang.String webAppMount, java.net.URL url, java.lang.String internalPath)Creates a newWebResourceSetfor thisWebResourceRootbased on the provided parameters.voidderegisterTrackedResource(TrackedWebResource trackedResource)Stop tracking specified resource, once it no longer needs to free resources.protected voiddestroyInternal()Sub-classes wishing to perform additional clean-up should override this method, ensuring that super.destroyInternal() is the last call in the overriding method.voidgc()Implementations may cache some information to improve performance.booleangetAllowLinking()Determine if this resources allow the use of symbolic links.java.lang.StringgetArchiveIndexStrategy()Get the strategy to use for the resources archive lookup.WebResourceRoot.ArchiveIndexStrategygetArchiveIndexStrategyEnum()Get the strategy to use for the resources archive lookup.java.util.List<java.net.URL>getBaseUrls()longgetCacheMaxSize()Get the maximum permitted size for the cache.intgetCacheObjectMaxSize()Get the maximum permitted size for a single object in the cache.WebResourceRoot.CacheStrategygetCacheStrategy()Obtain the current caching strategy.longgetCacheTtl()Get the Time-To-Live (TTL) for cache entries.WebResourcegetClassLoaderResource(java.lang.String path)Obtain the object that represents the class loader resource at the given path.WebResource[]getClassLoaderResources(java.lang.String path)Obtain the objects that represent the class loader resource at the given path.protected WebResourceSet[]getClassResources()ContextgetContext()protected java.lang.StringgetDomainInternal()Method implemented by sub-classes to identify the domain in which MBeans should be registered.WebResourceSet[]getJarResources()protected java.lang.StringgetObjectNameKeyProperties()Allow sub-classes to specify the key properties component of theObjectNamethat will be used to register this component.WebResourceSet[]getPostResources()WebResourceSet[]getPreResources()WebResourcegetResource(java.lang.String path)Obtain the object that represents the resource at the given path.protected WebResourcegetResource(java.lang.String path, boolean validate, boolean useClassLoaderResources)protected WebResourcegetResourceInternal(java.lang.String path, boolean useClassLoaderResources)WebResource[]getResources(java.lang.String path)Obtain the objects that represent the resource at the given path.protected WebResource[]getResourcesInternal(java.lang.String path, boolean useClassLoaderResources)java.util.List<java.lang.String>getTrackedResources()booleangetTrackLockedFiles()Has the track locked files feature been enabled?protected voidinitInternal()Sub-classes wishing to perform additional initialization should override this method, ensuring that super.initInternal() is the first call in the overriding method.booleanisCachingAllowed()protected booleanisPackedWarFile()java.lang.String[]list(java.lang.String path)Obtain the list of the names of all of the files and directories located in the specified directory.WebResource[]listResources(java.lang.String path)Obtain the list of all of the WebResources in the specified directory.protected WebResource[]listResources(java.lang.String path, boolean validate)java.util.Set<java.lang.String>listWebAppPaths(java.lang.String path)Obtain the Set of the web applications pathnames of all of the files and directories located in the specified directory.booleanmkdir(java.lang.String path)Create a new directory at the given path.protected voidprocessWebInfLib()Class loader resources are handled by treating JARs in WEB-INF/lib as resource JARs (without the internal META-INF/resources/ prefix) mounted at WEB-INF/classes (rather than the web app root).voidregisterTrackedResource(TrackedWebResource trackedResource)Add a specified resource to track to be able to later release resources on stop.protected voidregisterURLStreamHandlerFactory()voidsetAllowLinking(boolean allowLinking)Configure if this resources allow the use of symbolic links.voidsetArchiveIndexStrategy(java.lang.String archiveIndexStrategy)Set the strategy to use for the resources archive lookup.voidsetCacheMaxSize(long cacheMaxSize)Set the maximum permitted size for the cache.voidsetCacheObjectMaxSize(int cacheObjectMaxSize)Set the maximum permitted size for a single object in the cache.voidsetCacheStrategy(WebResourceRoot.CacheStrategy strategy)Set the current caching strategy.voidsetCacheTtl(long cacheTtl)Set the Time-To-Live (TTL) for cache entries.voidsetCachingAllowed(boolean cachingAllowed)Set whether or not caching is permitted for this web application.voidsetContext(Context context)Set the web application this WebResourceRoot is associated with.protected voidsetMainResources(WebResourceSet main)For unit testing.voidsetTrackLockedFiles(boolean trackLockedFiles)Controls whether the track locked files feature is enabled.protected voidstartInternal()Sub-classes must ensure that the state is changed toLifecycleState.STARTINGduring the execution of this method.protected voidstopInternal()Sub-classes must ensure that the state is changed toLifecycleState.STOPPINGduring the execution of this method.booleanwrite(java.lang.String path, java.io.InputStream is, boolean overwrite)Create a new resource at the requested path using the provided InputStream.- 
Methods inherited from class org.apache.catalina.util.LifecycleMBeanBasegetDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister, unregister
 - 
Methods inherited from class org.apache.catalina.util.LifecycleBaseaddLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stop
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.catalina.LifecycleaddLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop
 
- 
 
- 
- 
- 
Field Detail- 
smprotected static final StringManager sm 
 
- 
 - 
Constructor Detail- 
StandardRootpublic StandardRoot() Creates a new standard implementation ofWebResourceRoot. A no argument constructor is required for this to work with the digester.setContext(Context)must be called before this component is initialized.
 - 
StandardRootpublic StandardRoot(Context context) 
 
- 
 - 
Method Detail- 
listpublic java.lang.String[] list(java.lang.String path) Description copied from interface:WebResourceRootObtain the list of the names of all of the files and directories located in the specified directory.- Specified by:
- listin interface- WebResourceRoot
- Parameters:
- path- The path for the resource of interest relative to the root of the web application. It must start with '/'.
- Returns:
- The list of resources. If path does not refer to a directory then a zero length array will be returned.
 
 - 
listWebAppPathspublic java.util.Set<java.lang.String> listWebAppPaths(java.lang.String path) Description copied from interface:WebResourceRootObtain the Set of the web applications pathnames of all of the files and directories located in the specified directory. Paths representing directories will end with a '/' character.- Specified by:
- listWebAppPathsin interface- WebResourceRoot
- Parameters:
- path- The path for the resource of interest relative to the root of the web application. It must start with '/'.
- Returns:
- The Set of resources. If path does not refer to a directory then null will be returned.
 
 - 
mkdirpublic boolean mkdir(java.lang.String path) Description copied from interface:WebResourceRootCreate a new directory at the given path.- Specified by:
- mkdirin interface- WebResourceRoot
- Parameters:
- path- The path for the new resource to create relative to the root of the web application. It must start with '/'.
- Returns:
- trueif the directory was created, otherwise- false
 
 - 
writepublic boolean write(java.lang.String path, java.io.InputStream is, boolean overwrite)Description copied from interface:WebResourceRootCreate a new resource at the requested path using the provided InputStream.- Specified by:
- writein interface- WebResourceRoot
- Parameters:
- path- The path to be used for the new Resource. It is relative to the root of the web application and must start with '/'.
- is- The InputStream that will provide the content for the new Resource.
- overwrite- If- trueand the resource already exists it will be overwritten. If- falseand the resource already exists the write will fail.
- Returns:
- trueif and only if the new Resource is written
 
 - 
getResourcepublic WebResource getResource(java.lang.String path) Description copied from interface:WebResourceRootObtain the object that represents the resource at the given path. Note that the resource at that path may not exist. If the resource does not exist, the WebResource returned will be associated with the main WebResourceSet.- Specified by:
- getResourcein interface- WebResourceRoot
- Parameters:
- path- The path for the resource of interest relative to the root of the web application. It must start with '/'.
- Returns:
- The object that represents the resource at the given path
 
 - 
getResourceprotected WebResource getResource(java.lang.String path, boolean validate, boolean useClassLoaderResources) 
 - 
getClassLoaderResourcepublic WebResource getClassLoaderResource(java.lang.String path) Description copied from interface:WebResourceRootObtain the object that represents the class loader resource at the given path. WEB-INF/classes is always searched prior to searching JAR files in WEB-INF/lib. The search order for JAR files will be consistent across subsequent calls to this method until the web application is reloaded. No guarantee is made as to what the search order for JAR files may be.- Specified by:
- getClassLoaderResourcein interface- WebResourceRoot
- Parameters:
- path- The path of the class loader resource of interest relative to the the root of class loader resources for this web application.
- Returns:
- The object that represents the class loader resource at the given path
 
 - 
getClassLoaderResourcespublic WebResource[] getClassLoaderResources(java.lang.String path) Description copied from interface:WebResourceRootObtain the objects that represent the class loader resource at the given path. Note that the resource at that path may not exist. If the path does not exist, the WebResource returned will be associated with the main WebResourceSet. This will include all matches even if the resource would not normally be accessible (e.g. because it was overridden by another resource)- Specified by:
- getClassLoaderResourcesin interface- WebResourceRoot
- Parameters:
- path- The path for the class loader resource of interest relative to the root of the class loader resources for the web application. It must start with '/'.
- Returns:
- The objects that represents the class loader resources at the given path. There will always be at least one element although that element may represent a resource that is not present.
 
 - 
getResourceInternalprotected final WebResource getResourceInternal(java.lang.String path, boolean useClassLoaderResources) 
 - 
getResourcespublic WebResource[] getResources(java.lang.String path) Description copied from interface:WebResourceRootObtain the objects that represent the resource at the given path. Note that the resource at that path may not exist. If the resource does not exist, the WebResource returned will be associated with the main WebResourceSet. This will include all matches even if the resource would not normally be accessible (e.g. because it was overridden by another resource)- Specified by:
- getResourcesin interface- WebResourceRoot
- Parameters:
- path- The path for the resource of interest relative to the root of the web application. It must start with '/'.
- Returns:
- The objects that represents the resource at the given path
 
 - 
getResourcesInternalprotected WebResource[] getResourcesInternal(java.lang.String path, boolean useClassLoaderResources) 
 - 
listResourcespublic WebResource[] listResources(java.lang.String path) Description copied from interface:WebResourceRootObtain the list of all of the WebResources in the specified directory.- Specified by:
- listResourcesin interface- WebResourceRoot
- Parameters:
- path- The path for the resource of interest relative to the root of the web application. It must start with '/'.
- Returns:
- The list of resources. If path does not refer to a directory then a zero length array will be returned.
 
 - 
listResourcesprotected WebResource[] listResources(java.lang.String path, boolean validate) 
 - 
createWebResourceSetpublic void createWebResourceSet(WebResourceRoot.ResourceSetType type, java.lang.String webAppMount, java.net.URL url, java.lang.String internalPath) Description copied from interface:WebResourceRootCreates a newWebResourceSetfor thisWebResourceRootbased on the provided parameters.- Specified by:
- createWebResourceSetin interface- WebResourceRoot
- Parameters:
- type- The type of- WebResourceSetto create
- webAppMount- The path within the web application that the resources should be published at. It must start with '/'.
- url- The URL of the resource (must locate a JAR, file or directory)
- internalPath- The path within the resource where the content is to be found. It must start with '/'.
 
 - 
createWebResourceSetpublic void createWebResourceSet(WebResourceRoot.ResourceSetType type, java.lang.String webAppMount, java.lang.String base, java.lang.String archivePath, java.lang.String internalPath) Description copied from interface:WebResourceRootCreates a newWebResourceSetfor thisWebResourceRootbased on the provided parameters.- Specified by:
- createWebResourceSetin interface- WebResourceRoot
- Parameters:
- type- The type of- WebResourceSetto create
- webAppMount- The path within the web application that the resources should be published at. It must start with '/'.
- base- The location of the resources
- archivePath- The path within the resource to the archive where the content is to be found. If there is no archive then this should be- null.
- internalPath- The path within the archive (or the resource if the archivePath is- nullwhere the content is to be found. It must start with '/'.
 
 - 
addPreResourcespublic void addPreResources(WebResourceSet webResourceSet) Description copied from interface:WebResourceRootAdds the provided WebResourceSet to this web application as a 'Pre' resource.- Specified by:
- addPreResourcesin interface- WebResourceRoot
- Parameters:
- webResourceSet- the resource set to use
 
 - 
getPreResourcespublic WebResourceSet[] getPreResources() - Specified by:
- getPreResourcesin interface- WebResourceRoot
- Returns:
- the list of WebResourceSet configured to this web application as a 'Pre' resource.
 
 - 
addJarResourcespublic void addJarResources(WebResourceSet webResourceSet) Description copied from interface:WebResourceRootAdds the provided WebResourceSet to this web application as a 'Jar' resource.- Specified by:
- addJarResourcesin interface- WebResourceRoot
- Parameters:
- webResourceSet- the resource set to use
 
 - 
getJarResourcespublic WebResourceSet[] getJarResources() - Specified by:
- getJarResourcesin interface- WebResourceRoot
- Returns:
- the list of WebResourceSet configured to this web application as a 'Jar' resource.
 
 - 
addPostResourcespublic void addPostResources(WebResourceSet webResourceSet) Description copied from interface:WebResourceRootAdds the provided WebResourceSet to this web application as a 'Post' resource.- Specified by:
- addPostResourcesin interface- WebResourceRoot
- Parameters:
- webResourceSet- the resource set to use
 
 - 
getPostResourcespublic WebResourceSet[] getPostResources() - Specified by:
- getPostResourcesin interface- WebResourceRoot
- Returns:
- the list of WebResourceSet configured to this web application as a 'Post' resource.
 
 - 
getClassResourcesprotected WebResourceSet[] getClassResources() 
 - 
addClassResourcesprotected void addClassResources(WebResourceSet webResourceSet) 
 - 
setAllowLinkingpublic void setAllowLinking(boolean allowLinking) Description copied from interface:WebResourceRootConfigure if this resources allow the use of symbolic links.- Specified by:
- setAllowLinkingin interface- WebResourceRoot
- Parameters:
- allowLinking-- trueif symbolic links are allowed.
 
 - 
getAllowLinkingpublic boolean getAllowLinking() Description copied from interface:WebResourceRootDetermine if this resources allow the use of symbolic links.- Specified by:
- getAllowLinkingin interface- WebResourceRoot
- Returns:
- trueif symbolic links are allowed
 
 - 
setCachingAllowedpublic void setCachingAllowed(boolean cachingAllowed) Description copied from interface:WebResourceRootSet whether or not caching is permitted for this web application.- Specified by:
- setCachingAllowedin interface- WebResourceRoot
- Parameters:
- cachingAllowed-- trueto enable caching, else- false
 
 - 
isCachingAllowedpublic boolean isCachingAllowed() - Specified by:
- isCachingAllowedin interface- WebResourceRoot
- Returns:
- trueif caching is permitted for this web application.
 
 - 
getCacheStrategypublic WebResourceRoot.CacheStrategy getCacheStrategy() Description copied from interface:WebResourceRootObtain the current caching strategy.The default implementation returns null. Sub-classes wishing to utilise aWebResourceRoot.CacheStrategyshould provide an appropriate implementation.- Specified by:
- getCacheStrategyin interface- WebResourceRoot
- Returns:
- the current caching strategy or nullif no strategy has been configured
 
 - 
setCacheStrategypublic void setCacheStrategy(WebResourceRoot.CacheStrategy strategy) Description copied from interface:WebResourceRootSet the current caching strategy.The default implementation is a NO-OP. Sub-classes wishing to utilise a WebResourceRoot.CacheStrategyshould provide an appropriate implementation.- Specified by:
- setCacheStrategyin interface- WebResourceRoot
- Parameters:
- strategy- The new strategy to use or- nullfor no strategy
 
 - 
getCacheTtlpublic long getCacheTtl() Description copied from interface:WebResourceRootGet the Time-To-Live (TTL) for cache entries.- Specified by:
- getCacheTtlin interface- WebResourceRoot
- Returns:
- TTL in milliseconds
 
 - 
setCacheTtlpublic void setCacheTtl(long cacheTtl) Description copied from interface:WebResourceRootSet the Time-To-Live (TTL) for cache entries.- Specified by:
- setCacheTtlin interface- WebResourceRoot
- Parameters:
- cacheTtl- TTL in milliseconds
 
 - 
getCacheMaxSizepublic long getCacheMaxSize() Description copied from interface:WebResourceRootGet the maximum permitted size for the cache.- Specified by:
- getCacheMaxSizein interface- WebResourceRoot
- Returns:
- Maximum cache size in kilobytes
 
 - 
setCacheMaxSizepublic void setCacheMaxSize(long cacheMaxSize) Description copied from interface:WebResourceRootSet the maximum permitted size for the cache.- Specified by:
- setCacheMaxSizein interface- WebResourceRoot
- Parameters:
- cacheMaxSize- Maximum cache size in kilobytes
 
 - 
setCacheObjectMaxSizepublic void setCacheObjectMaxSize(int cacheObjectMaxSize) Description copied from interface:WebResourceRootSet the maximum permitted size for a single object in the cache. Note that the maximum size in bytes may not exceedInteger.MAX_VALUE.- Specified by:
- setCacheObjectMaxSizein interface- WebResourceRoot
- Parameters:
- cacheObjectMaxSize- Maximum size for a single cached object in kilobytes
 
 - 
getCacheObjectMaxSizepublic int getCacheObjectMaxSize() Description copied from interface:WebResourceRootGet the maximum permitted size for a single object in the cache. Note that the maximum size in bytes may not exceedInteger.MAX_VALUE.- Specified by:
- getCacheObjectMaxSizein interface- WebResourceRoot
- Returns:
- Maximum size for a single cached object in kilobytes
 
 - 
setTrackLockedFilespublic void setTrackLockedFiles(boolean trackLockedFiles) Description copied from interface:WebResourceRootControls whether the track locked files feature is enabled. If enabled, all calls to methods that return objects that lock a file and need to be closed to release that lock (e.g.WebResource.getInputStream()will perform a number of additional tasks.- The stack trace at the point where the method was called will be recorded and associated with the returned object.
- The returned object will be wrapped so that the point where close() (or equivalent) is called to release the resources can be detected. Tracking of the object will cease once the resources have been released.
- All remaining locked resources on web application shutdown will be logged and then closed.
 - Specified by:
- setTrackLockedFilesin interface- WebResourceRoot
- Parameters:
- trackLockedFiles-- trueto enable it,- falseto disable it
 
 - 
getTrackLockedFilespublic boolean getTrackLockedFiles() Description copied from interface:WebResourceRootHas the track locked files feature been enabled?- Specified by:
- getTrackLockedFilesin interface- WebResourceRoot
- Returns:
- trueif it has been enabled, otherwise- false
 
 - 
setArchiveIndexStrategypublic void setArchiveIndexStrategy(java.lang.String archiveIndexStrategy) Description copied from interface:WebResourceRootSet the strategy to use for the resources archive lookup.- Specified by:
- setArchiveIndexStrategyin interface- WebResourceRoot
- Parameters:
- archiveIndexStrategy- The strategy to use for the resources archive lookup
 
 - 
getArchiveIndexStrategypublic java.lang.String getArchiveIndexStrategy() Description copied from interface:WebResourceRootGet the strategy to use for the resources archive lookup.- Specified by:
- getArchiveIndexStrategyin interface- WebResourceRoot
- Returns:
- The strategy to use for the resources archive lookup
 
 - 
getArchiveIndexStrategyEnumpublic WebResourceRoot.ArchiveIndexStrategy getArchiveIndexStrategyEnum() Description copied from interface:WebResourceRootGet the strategy to use for the resources archive lookup.- Specified by:
- getArchiveIndexStrategyEnumin interface- WebResourceRoot
- Returns:
- The strategy to use for the resources archive lookup
 
 - 
getTrackedResourcespublic java.util.List<java.lang.String> getTrackedResources() 
 - 
getContextpublic Context getContext() - Specified by:
- getContextin interface- WebResourceRoot
- Returns:
- the web application this WebResourceRoot is associated with.
 
 - 
setContextpublic void setContext(Context context) Description copied from interface:WebResourceRootSet the web application this WebResourceRoot is associated with.- Specified by:
- setContextin interface- WebResourceRoot
- Parameters:
- context- the associated context
 
 - 
processWebInfLibprotected void processWebInfLib() throws LifecycleExceptionClass loader resources are handled by treating JARs in WEB-INF/lib as resource JARs (without the internal META-INF/resources/ prefix) mounted at WEB-INF/classes (rather than the web app root). This enables reuse of the resource handling plumbing. These resources are marked as class loader only so they are only used in the methods that are explicitly defined to return class loader resources. This prevents calls to getResource("/WEB-INF/classes") returning from one or more of the JAR files.- Throws:
- LifecycleException- If an error occurs that should stop the web application from starting
 
 - 
setMainResourcesprotected final void setMainResources(WebResourceSet main) For unit testing.- Parameters:
- main- The main resources
 
 - 
backgroundProcesspublic void backgroundProcess() Description copied from interface:WebResourceRootThis method will be invoked by the context on a periodic basis and allows the implementation a method that executes periodic tasks, such as purging expired cache entries.- Specified by:
- backgroundProcessin interface- WebResourceRoot
 
 - 
gcpublic void gc() Description copied from interface:WebResourceRootImplementations may cache some information to improve performance. This method triggers the clean-up of those resources.- Specified by:
- gcin interface- WebResourceRoot
 
 - 
registerTrackedResourcepublic void registerTrackedResource(TrackedWebResource trackedResource) Description copied from interface:WebResourceRootAdd a specified resource to track to be able to later release resources on stop.- Specified by:
- registerTrackedResourcein interface- WebResourceRoot
- Parameters:
- trackedResource- the resource that will be tracked
 
 - 
deregisterTrackedResourcepublic void deregisterTrackedResource(TrackedWebResource trackedResource) Description copied from interface:WebResourceRootStop tracking specified resource, once it no longer needs to free resources.- Specified by:
- deregisterTrackedResourcein interface- WebResourceRoot
- Parameters:
- trackedResource- the resource that was tracked
 
 - 
getBaseUrlspublic java.util.List<java.net.URL> getBaseUrls() - Specified by:
- getBaseUrlsin interface- WebResourceRoot
- Returns:
- the set of WebResourceSet.getBaseUrl()for allWebResourceSets used by this root.
 
 - 
isPackedWarFileprotected boolean isPackedWarFile() 
 - 
getDomainInternalprotected java.lang.String getDomainInternal() Description copied from class:LifecycleMBeanBaseMethod implemented by sub-classes to identify the domain in which MBeans should be registered.- Specified by:
- getDomainInternalin class- LifecycleMBeanBase
- Returns:
- The name of the domain to use to register MBeans.
 
 - 
getObjectNameKeyPropertiesprotected java.lang.String getObjectNameKeyProperties() Description copied from class:LifecycleMBeanBaseAllow sub-classes to specify the key properties component of theObjectNamethat will be used to register this component.- Specified by:
- getObjectNameKeyPropertiesin class- LifecycleMBeanBase
- Returns:
- The string representation of the key properties component of the
          desired ObjectName
 
 - 
initInternalprotected void initInternal() throws LifecycleExceptionDescription copied from class:LifecycleMBeanBaseSub-classes wishing to perform additional initialization should override this method, ensuring that super.initInternal() is the first call in the overriding method.- Overrides:
- initInternalin class- LifecycleMBeanBase
- Throws:
- LifecycleException- If the initialisation fails
 
 - 
registerURLStreamHandlerFactoryprotected void registerURLStreamHandlerFactory() 
 - 
startInternalprotected void startInternal() throws LifecycleExceptionDescription copied from class:LifecycleBaseSub-classes must ensure that the state is changed toLifecycleState.STARTINGduring the execution of this method. Changing state will trigger theLifecycle.START_EVENTevent. If a component fails to start it may either throw aLifecycleExceptionwhich will cause it's parent to fail to start or it can place itself in the error state in which caseLifecycleBase.stop()will be called on the failed component but the parent component will continue to start normally.- Specified by:
- startInternalin class- LifecycleBase
- Throws:
- LifecycleException- Start error occurred
 
 - 
createMainResourceSetprotected WebResourceSet createMainResourceSet() 
 - 
stopInternalprotected void stopInternal() throws LifecycleExceptionDescription copied from class:LifecycleBaseSub-classes must ensure that the state is changed toLifecycleState.STOPPINGduring the execution of this method. Changing state will trigger theLifecycle.STOP_EVENTevent.- Specified by:
- stopInternalin class- LifecycleBase
- Throws:
- LifecycleException- Stop error occurred
 
 - 
destroyInternalprotected void destroyInternal() throws LifecycleExceptionDescription copied from class:LifecycleMBeanBaseSub-classes wishing to perform additional clean-up should override this method, ensuring that super.destroyInternal() is the last call in the overriding method.- Overrides:
- destroyInternalin class- LifecycleMBeanBase
- Throws:
- LifecycleException- If the destruction fails
 
 
- 
 
-