Top Description Methods
org.apache.catalina

public Interface Loader

Known Direct Implementers
org.apache.catalina.loader.WebappLoader
Imports
java.beans.PropertyChangeListener

A Loader represents a Java ClassLoader implementation that can be used by a Container to load class files (within a repository associated with the Loader) that are designed to be reloaded upon request, as well as a mechanism to detect whether changes have occurred in the underlying repository.

In order for a Loader implementation to successfully operate with a Context implementation that implements reloading, it must obey the following constraints:

Author
Craig R. McClanahan

Method Summary

Modifier and TypeMethod and Description
public void
addPropertyChangeListener(PropertyChangeListener
The listener to add
listener
)

Add a property change listener to this component.

public void
backgroundProcess()

Execute a periodic task, such as reloading, etc. This method will be invoked inside the classloading context of this container.

public ClassLoader

Returns:

the Java class loader to be used by this Container.
getClassLoader
()

public Context

Returns:

the Context with which this Loader has been associated.
getContext
()

public boolean

Returns:

the "follow standard delegation model" flag used to configure our ClassLoader.
getDelegate
()

public boolean

Returns:

true when the repository has been modified, false otherwise
modified
()

Has the internal repository associated with this Loader been modified, such that the loaded classes should be reloaded?

public void
removePropertyChangeListener(PropertyChangeListener
The listener to remove
listener
)

Remove a property change listener from this component.

public void
setContext(Context
The associated Context
context
)

Set the Context with which this Loader has been associated.

public void
setDelegate(boolean
The new flag
delegate
)

Set the "follow standard delegation model" flag used to configure our ClassLoader.

Method Detail

addPropertyChangeListenerback to summary
public void addPropertyChangeListener(PropertyChangeListener listener)

Add a property change listener to this component.

Parameters
listener:PropertyChangeListener

The listener to add

backgroundProcessback to summary
public void backgroundProcess()

Execute a periodic task, such as reloading, etc. This method will be invoked inside the classloading context of this container. Unexpected throwables will be caught and logged.

getClassLoaderback to summary
public ClassLoader getClassLoader()
Returns:ClassLoader

the Java class loader to be used by this Container.

getContextback to summary
public Context getContext()
Returns:Context

the Context with which this Loader has been associated.

getDelegateback to summary
public boolean getDelegate()
Returns:boolean

the "follow standard delegation model" flag used to configure our ClassLoader.

modifiedback to summary
public boolean modified()

Has the internal repository associated with this Loader been modified, such that the loaded classes should be reloaded?

Returns:boolean

true when the repository has been modified, false otherwise

removePropertyChangeListenerback to summary
public void removePropertyChangeListener(PropertyChangeListener listener)

Remove a property change listener from this component.

Parameters
listener:PropertyChangeListener

The listener to remove

setContextback to summary
public void setContext(Context context)

Set the Context with which this Loader has been associated.

Parameters
context:Context

The associated Context

setDelegateback to summary
public void setDelegate(boolean delegate)

Set the "follow standard delegation model" flag used to configure our ClassLoader.

Parameters
delegate:boolean

The new flag