com.scooterframework.admin
Class EventsManager

java.lang.Object
  extended by com.scooterframework.admin.EventsManager

public class EventsManager
extends java.lang.Object

EventsManager class manages events.


Method Summary
static EventsManager getInstance()
          Returns the singleton instance of the EventsManager.
 void publishEvent(Event event)
          Publishes an event.
 void registerListener(java.lang.String eventType, Listener listener)
          Register a listener for a specific event type.
 void removeListener(Listener listener)
          Removes a listener for all event types.
 void removeListener(java.lang.String eventType, Listener listener)
          Removes a listener for a specific event type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static EventsManager getInstance()
Returns the singleton instance of the EventsManager.

Returns:
the singleton instance of the EventsManager.

registerListener

public void registerListener(java.lang.String eventType,
                             Listener listener)
Register a listener for a specific event type.

Parameters:
eventType - The event type
listener - The event listener to be registered.

removeListener

public void removeListener(java.lang.String eventType,
                           Listener listener)
Removes a listener for a specific event type.

Parameters:
eventType - The event type
listener - The event listener to be removed.

removeListener

public void removeListener(Listener listener)
Removes a listener for all event types.

Parameters:
listener - The event listener to be removed.

publishEvent

public void publishEvent(Event event)
Publishes an event.

Parameters:
event - The event to be published.