In order for a Loader implementation to successfully operate
with a Context implementation that implements reloading, it
must obey the following constraints:
Lifecycle so that the Context can indicate
that a new class loader is required.
start() method must unconditionally create a new
ClassLoader implementation.
stop() method must throw away its reference to the
ClassLoader previously utilized, so that the class loader,
all classes loaded by it, and all objects of those classes, can be
garbage collected.
stop() to be followed by a call to
start() on the same Loader instance.
Context.reload() method on the owning Context
when a change to one or more of the class files loaded by this class
loader is detected.
| Modifier and Type | Method 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 | |
| public Context | |
| public boolean | Returns: the "follow standard delegation model" flag used to configure our ClassLoader.
|
| public boolean | Returns: true when the repository has been modified,
false otherwiseHas 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. |
| addPropertyChangeListener | back to summary |
|---|---|
| public void addPropertyChangeListener(PropertyChangeListener listener) Add a property change listener to this component.
| |
| backgroundProcess | back 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. | |
| getClassLoader | back to summary |
|---|---|
public ClassLoader getClassLoader()
| |
| getContext | back to summary |
|---|---|
public Context getContext()
| |
| getDelegate | back to summary |
|---|---|
public boolean getDelegate()
| |
| modified | back to summary |
|---|---|
| public boolean modified() Has the internal repository associated with this Loader been modified, such that the loaded classes should be reloaded?
| |
| removePropertyChangeListener | back to summary |
|---|---|
| public void removePropertyChangeListener(PropertyChangeListener listener) Remove a property change listener from this component.
| |
| setContext | back to summary |
|---|---|
| public void setContext(Context context) Set the Context with which this Loader has been associated.
| |
| setDelegate | back to summary |
|---|---|
| public void setDelegate(boolean delegate) Set the "follow standard delegation model" flag used to configure our ClassLoader.
| |