public abstract class AbstractResourceSet extends LifecycleBase implements WebResourceSet
Modifier and Type | Field and Description |
---|---|
protected static StringManager |
sm |
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 and Description |
---|
AbstractResourceSet() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkPath(String path) |
protected void |
destroyInternal() |
protected String |
getBase() |
boolean |
getClassLoaderOnly()
Are resources provided by this resource set only intended for use by
calls to
WebResourceRoot.getClassLoaderResource(String) . |
protected String |
getInternalPath() |
protected WebResourceRoot |
getRoot() |
protected String |
getWebAppMount() |
void |
setBase(String base) |
void |
setClassLoaderOnly(boolean classLoaderOnly) |
void |
setInternalPath(String internalPath) |
void |
setRoot(WebResourceRoot root) |
void |
setWebAppMount(String webAppMount) |
protected void |
startInternal()
Sub-classes must ensure that the state is changed to
LifecycleState.STARTING during the execution of this method. |
protected void |
stopInternal()
Sub-classes must ensure that the state is changed to
LifecycleState.STOPPING during the execution of this method. |
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, initInternal, removeLifecycleListener, setState, setState, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBaseUrl, getResource, isReadOnly, list, listWebAppPaths, mkdir, setReadOnly, write
addLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop
protected static final StringManager sm
protected final void checkPath(String path)
public final void setRoot(WebResourceRoot root)
setRoot
in interface WebResourceSet
protected final WebResourceRoot getRoot()
protected final String getInternalPath()
public final void setInternalPath(String internalPath)
public final void setWebAppMount(String webAppMount)
protected final String getWebAppMount()
public final void setBase(String base)
protected final String getBase()
public boolean getClassLoaderOnly()
WebResourceSet
WebResourceRoot.getClassLoaderResource(String)
.getClassLoaderOnly
in interface WebResourceSet
true
if these resources should only be used for
calls to WebResourceRoot.getClassLoaderResource(String)
,
otherwise false
public void setClassLoaderOnly(boolean classLoaderOnly)
setClassLoaderOnly
in interface WebResourceSet
protected final void startInternal() throws LifecycleException
LifecycleBase
LifecycleState.STARTING
during the execution of this method.
Changing state will trigger the Lifecycle.START_EVENT
event.
If a component fails to start it may either throw a
LifecycleException
which will cause it's parent to fail to start
or it can place itself in the error state in which case LifecycleBase.stop()
will be called on the failed component but the parent component will
continue to start normally.startInternal
in class LifecycleBase
LifecycleException
protected final void stopInternal() throws LifecycleException
LifecycleBase
LifecycleState.STOPPING
during the execution of this method.
Changing state will trigger the Lifecycle.STOP_EVENT
event.stopInternal
in class LifecycleBase
LifecycleException
protected final void destroyInternal() throws LifecycleException
destroyInternal
in class LifecycleBase
LifecycleException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.