de.deepamehta.core.service
Class DeepaMehtaEvent

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.core.service.DeepaMehtaEvent

public abstract class DeepaMehtaEvent
extends Object

Base class for all events. That is core events as well as plugin events.


Field Summary
private static Map<String,DeepaMehtaEvent> events
          A map of all known events (contains core events as well as plugin events).
private  Class listenerInterface
          The corresponding listener interface for this event.
 
Constructor Summary
DeepaMehtaEvent(Class listenerInterface)
           
 
Method Summary
abstract  void deliver(EventListener listener, Object... params)
          Delivers this event to the given listener.
static DeepaMehtaEvent getEvent(Class listenerInterface)
          Returns the event that corresponds to the given listener interface.
 Class getListenerInterface()
          Returns the corresponding listener interface for this event.
private  void putEvent(DeepaMehtaEvent event, Class listenerInterface)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

events

private static Map<String,DeepaMehtaEvent> events
A map of all known events (contains core events as well as plugin events). Used to find the event that corresponds to a certain listener interface.


listenerInterface

private final Class listenerInterface
The corresponding listener interface for this event.

Constructor Detail

DeepaMehtaEvent

public DeepaMehtaEvent(Class listenerInterface)
Method Detail

deliver

public abstract void deliver(EventListener listener,
                             Object... params)
Delivers this event to the given listener.


getListenerInterface

public Class getListenerInterface()
Returns the corresponding listener interface for this event.


getEvent

public static DeepaMehtaEvent getEvent(Class listenerInterface)
Returns the event that corresponds to the given listener interface.


toString

public String toString()
Overrides:
toString in class Object

putEvent

private void putEvent(DeepaMehtaEvent event,
                      Class listenerInterface)


Copyright © 2014. All Rights Reserved.