T - The type of the tracked object.public interface ModuleTrackerCustomizer<T>
ModuleTrackerCustomizer interface allows a ModuleTracker
to customize the Modules that are tracked. A
ModuleTrackerCustomizer is called when a module is being added to a
ModuleTracker. The ModuleTrackerCustomizer can then return an
object for the tracked module. A ModuleTrackerCustomizer is also
called when a tracked module is modified or has been removed from a
ModuleTracker.
The methods in this interface may be called as the result of a
ModuleEvent being received by a ModuleTracker. Since
ModuleEvents are received synchronously by the ModuleTracker,
it is highly recommended that implementations of these methods do not alter
module states while being synchronized on any object.
The ModuleTracker class is thread-safe. It does not call a
ModuleTrackerCustomizer while holding any locks.
ModuleTrackerCustomizer implementations must also be thread-safe.
| Modifier and Type | Method and Description |
|---|---|
T |
addingModule(Module module,
ModuleEvent event)
A module is being added to the
ModuleTracker. |
void |
modifiedModule(Module module,
ModuleEvent event,
T object)
A module tracked by the
ModuleTracker has been modified. |
void |
removedModule(Module module,
ModuleEvent event,
T object)
A module tracked by the
ModuleTracker has been removed. |
T addingModule(Module module, ModuleEvent event)
ModuleTracker.
This method is called before a module which matched the search parameters
of the ModuleTracker is added to the ModuleTracker. This
method should return the object to be tracked for the specified
Module. The returned object is stored in the
ModuleTracker and is available from the
getObject method.
module - The Module being added to the ModuleTracker
.event - The module event which caused this customizer method to be
called or null if there is no module event associated with
the call to this method.Module object
or null if the specified Module object should not
be tracked.void modifiedModule(Module module, ModuleEvent event, T object)
ModuleTracker has been modified.
This method is called when a module being tracked by the
ModuleTracker has had its state modified.
module - The Module whose state has been modified.event - The module event which caused this customizer method to be
called or null if there is no module event associated with
the call to this method.object - The tracked object for the specified module.void removedModule(Module module, ModuleEvent event, T object)
ModuleTracker has been removed.
This method is called after a module is no longer being tracked by the
ModuleTracker.
module - The Module that has been removed.event - The module event which caused this customizer method to be
called or null if there is no module event associated with
the call to this method.object - The tracked object for the specified module.Copyright © 2015 JBoss by Red Hat. All rights reserved.