org.severe.jripples.modules.manager
Class ModuleSwitchEvent

java.lang.Object
  extended by org.severe.jripples.modules.manager.ModuleSwitchEvent

public class ModuleSwitchEvent
extends java.lang.Object

This class represents an event of activation and / or deactivation of JRipples modules. If both getNewLoader() and getOldLoader() are set, then an old loader was replaced by a new loader as they both share the same category of JRipples modules.

Author:
Maksym Petrenko
See Also:
ModuleProxy, ModuleSwitchEvent

Method Summary
 int getControllerType()
          Returns a role of a controller, which triggered this event, so that clients registered for receiving this kind of event can process the event more appropriately.
 JRipplesModuleLoader getNewLoader()
          Returns a module that was activated in this event.
 JRipplesModuleLoader getOldLoader()
          Returns a module that was deactivated in this event.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getControllerType

public int getControllerType()
Returns a role of a controller, which triggered this event, so that clients registered for receiving this kind of event can process the event more appropriately.

Returns:
role of a controller, which triggered activation or deactivation of this event

getNewLoader

public JRipplesModuleLoader getNewLoader()
Returns a module that was activated in this event.

Returns:
a module that was activated in this event if any,
null otherwise

getOldLoader

public JRipplesModuleLoader getOldLoader()
Returns a module that was deactivated in this event. This can happen as a simple order of ModuleProxy or as a result of activation of another module in the same category of modules.

Returns:
a module that was deactivated if any,
null otherwise
See Also:
getNewLoader()