| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.demac.event.EventService
public abstract class EventService
The generic event service of the DEMAC architecture.
| Constructor Summary | |
|---|---|
| EventService() | |
| Method Summary | |
|---|---|
| abstract  void | addEventListener(DeviceHandle device,
                 EventListener listener,
                 EventHandle eventHandle)Method to register an org.demac.event.EventListener for a specific org.demac.event.Event at the EventService of a local or remote org.demac.Device. | 
| abstract  void | addEventListener(EventListener listener,
                 EventHandle eventHandle)Method to register an org.demac.event.EventListener for a specific org.demac.event.Event at the EventService. | 
| abstract  void | dispatchEvent(Event event)Method to trigger the dispatch of an org.demac.event.Event. | 
| static EventService | getEventService()Method to get an instance of the DEMAC event service. | 
| abstract  void | registerEventParser(EventHandle eventHandle,
                    java.lang.Class parser)Method to register a parser for a custom event. | 
| abstract  void | removeEventListener(EventListener listener)Method to remove an org.demac.event.EventListener for all org.demac.event.Events from the EventService. | 
| abstract  void | removeEventListener(EventListener listener,
                    EventHandle event)Method to remove an org.demac.event.EventListener for an specific org.demac.event.Event from the EventService. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface org.demac.Service | 
|---|
| isStarted, start, stop | 
| Constructor Detail | 
|---|
public EventService()
| Method Detail | 
|---|
public static EventService getEventService()
public abstract void addEventListener(EventListener listener,
                                      EventHandle eventHandle)
listener - the listener to registerevent - the event handle which should be send to the listener
public abstract void addEventListener(DeviceHandle device,
                                      EventListener listener,
                                      EventHandle eventHandle)
device - the handle of the device where to register the eventlistener - the listener to registerevent - the event handle which should be send to the listenerpublic abstract void removeEventListener(EventListener listener)
listener - the listener which should be removed from the service
public abstract void removeEventListener(EventListener listener,
                                         EventHandle event)
listener - the listener which should be removed from the serviceevent - the event for which the listener should be removedpublic abstract void dispatchEvent(Event event)
event - the event which is to be dispatched.
public abstract void registerEventParser(EventHandle eventHandle,
                                         java.lang.Class parser)
                                  throws java.lang.IllegalArgumentException
eventHandle - the handle of the event that is assosiated to the parserparser - the parser for the associated event
java.lang.IllegalArgumentException - if the associated parser class does not implement the interface org.demac.event.EventParser or does not have an empty constructor| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||