public class AVMWebappLoader extends Object implements org.apache.catalina.Lifecycle, org.apache.catalina.Loader, PropertyChangeListener, MBeanRegistration
This class loader is configured by adding the pathnames of directories,
JAR files, and ZIP files with the addRepository() method,
prior to calling start(). When a new class is required,
these repositories will be consulted first to locate the class. If it
is not present, the system class loader will be used instead.
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.catalina.util.LifecycleSupport |
lifecycle
The lifecycle event support for this component.
|
protected static org.apache.catalina.util.StringManager |
sm
The string manager for this package.
|
protected PropertyChangeSupport |
support
The property change support for this component.
|
| Constructor and Description |
|---|
AVMWebappLoader()
Construct a new AVMWebappLoader with no defined parent class loader
(so that the actual parent will be the system class loader).
|
AVMWebappLoader(ClassLoader parent,
Map<String,ClassLoader> context_classloader_registry,
String context_path,
String parent_context_path,
int version,
String avm_webapp_path)
Construct a new AVMWebappLoader with the specified class loader
to be defined as the parent of the ClassLoader we ultimately create.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLifecycleListener(org.apache.catalina.LifecycleListener listener)
Add a lifecycle event listener to this component.
|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener to this component.
|
void |
addRepository(String repository)
Add a new repository to the set of repositories for this class loader.
|
void |
backgroundProcess()
Execute a periodic task, such as reloading, etc.
|
void |
closeJARs(boolean force)
Used to periodically signal to the classloader to release JAR resources.
|
void |
destroy() |
org.apache.catalina.LifecycleListener[] |
findLifecycleListeners()
Get the lifecycle listeners associated with this lifecycle.
|
String[] |
findRepositories()
Return the set of repositories defined for this class loader.
|
ClassLoader |
getClassLoader()
Return the Java class loader to be used by this Container.
|
String |
getClasspath()
Classpath, as set in org.apache.catalina.jsp_classpath context
property
|
org.apache.catalina.Container |
getContainer()
Return the Container with which this AVMWebappLoader
has been associated (i.e.: an AVMStandardContext).
|
ObjectName |
getController() |
boolean |
getDelegate()
Return the "follow standard delegation model" flag used to configure
our ClassLoader.
|
String |
getInfo()
Return descriptive information about this Loader implementation and
the corresponding version number, in the format
<description>/<version>. |
String |
getLoaderClass()
Return the ClassLoader class name.
|
String[] |
getLoaderRepositories() |
String |
getLoaderRepositoriesString() |
boolean |
getReloadable()
Return the reloadable flag for this Loader.
|
String[] |
getRepositories() |
String |
getRepositoriesString()
Extra repositories for this loader
|
void |
init() |
boolean |
modified()
Has the internal repository associated with this Loader been modified,
such that the loaded classes should be reloaded?
|
void |
postDeregister() |
void |
postRegister(Boolean registrationDone) |
void |
preDeregister() |
ObjectName |
preRegister(MBeanServer server,
ObjectName name) |
void |
propertyChange(PropertyChangeEvent event)
Process property change events from our associated Context.
|
void |
removeLifecycleListener(org.apache.catalina.LifecycleListener listener)
Remove a lifecycle event listener from this component.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener from this component.
|
void |
setContainer(org.apache.catalina.Container container)
Set the Container with which this Logger has been associated.
|
void |
setController(ObjectName controller) |
void |
setDelegate(boolean delegate)
Set the "follow standard delegation model" flag used to configure
our ClassLoader.
|
void |
setLoaderClass(String loaderClass)
Set the ClassLoader class name.
|
void |
setReloadable(boolean reloadable)
Set the reloadable flag for this Loader.
|
void |
start()
Start this component, initializing our associated class loader.
|
void |
stop()
Stop this component, finalizing our associated class loader.
|
String |
toString()
Return a String representation of this component.
|
protected org.apache.catalina.util.LifecycleSupport lifecycle
protected static final org.apache.catalina.util.StringManager sm
protected PropertyChangeSupport support
public AVMWebappLoader()
public AVMWebappLoader(ClassLoader parent, Map<String,ClassLoader> context_classloader_registry, String context_path, String parent_context_path, int version, String avm_webapp_path)
parent - The parent class loaderpublic ClassLoader getClassLoader()
getClassLoader in interface org.apache.catalina.Loaderpublic org.apache.catalina.Container getContainer()
getContainer in interface org.apache.catalina.Loaderpublic void setContainer(org.apache.catalina.Container container)
setContainer in interface org.apache.catalina.Loadercontainer - The associated Containerpublic boolean getDelegate()
getDelegate in interface org.apache.catalina.Loaderpublic void setDelegate(boolean delegate)
setDelegate in interface org.apache.catalina.Loaderdelegate - The new flagpublic String getInfo()
<description>/<version>.getInfo in interface org.apache.catalina.Loaderpublic String getLoaderClass()
public void setLoaderClass(String loaderClass)
loaderClass - The new ClassLoader class namepublic boolean getReloadable()
getReloadable in interface org.apache.catalina.Loaderpublic void setReloadable(boolean reloadable)
setReloadable in interface org.apache.catalina.Loaderreloadable - The new reloadable flagpublic void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in interface org.apache.catalina.Loaderlistener - The listener to addpublic void addRepository(String repository)
addRepository in interface org.apache.catalina.Loaderrepository - Repository to be addedpublic void backgroundProcess()
backgroundProcess in interface org.apache.catalina.Loaderpublic String[] findRepositories()
findRepositories in interface org.apache.catalina.Loaderpublic String[] getRepositories()
public String getRepositoriesString()
public String[] getLoaderRepositories()
public String getLoaderRepositoriesString()
public String getClasspath()
public boolean modified()
modified in interface org.apache.catalina.Loaderpublic void closeJARs(boolean force)
public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface org.apache.catalina.Loaderlistener - The listener to removepublic String toString()
public void addLifecycleListener(org.apache.catalina.LifecycleListener listener)
addLifecycleListener in interface org.apache.catalina.Lifecyclelistener - The listener to addpublic org.apache.catalina.LifecycleListener[] findLifecycleListeners()
findLifecycleListeners in interface org.apache.catalina.Lifecyclepublic void removeLifecycleListener(org.apache.catalina.LifecycleListener listener)
removeLifecycleListener in interface org.apache.catalina.Lifecyclelistener - The listener to removepublic void init()
public void destroy()
public void start()
throws org.apache.catalina.LifecycleException
start in interface org.apache.catalina.Lifecycleorg.apache.catalina.LifecycleException - if a lifecycle error occurspublic void stop()
throws org.apache.catalina.LifecycleException
stop in interface org.apache.catalina.Lifecycleorg.apache.catalina.LifecycleException - if a lifecycle error occurspublic void propertyChange(PropertyChangeEvent event)
propertyChange in interface PropertyChangeListenerevent - The property change event that has occurredpublic ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
preRegister in interface MBeanRegistrationExceptionpublic void postRegister(Boolean registrationDone)
postRegister in interface MBeanRegistrationpublic void preDeregister()
throws Exception
preDeregister in interface MBeanRegistrationExceptionpublic void postDeregister()
postDeregister in interface MBeanRegistrationpublic ObjectName getController()
public void setController(ObjectName controller)
Copyright © 2005–2014 Alfresco Software. All rights reserved.