|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.demac.event.EventService
org.demac.impl.event.EventServiceImpl
public class EventServiceImpl
TODO
Nested Class Summary | |
---|---|
class |
EventServiceImpl.EventHelper
|
class |
EventServiceImpl.ForeignDispatcher
|
class |
EventServiceImpl.LocalDispatcher
|
Method Summary | |
---|---|
void |
addEventListener(DeviceHandle dh,
EventListener el,
EventHandle eh)
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. |
void |
addEventListener(EventListener listener,
EventHandle eh)
Method to register an org.demac.event.EventListener for a specific org.demac.event.Event at the EventService. |
void |
deviceDetected(Device device)
This method is called when the org.demac.transport.TransportService detects a new device and adds it to it's list of new devices. |
void |
deviceRemoved(Device arg0)
This method is called when the org.demac.transport.TransportService removes a device from the list of known devices. |
void |
dispatchEvent(Event ev)
Method to trigger the dispatch of an org.demac.event.Event. |
void |
exceptionOccured(TransportException arg0)
This method is called to inform the implementing object about ocurred org.demac.transport.TransportException[s]. |
static EventService |
getEventService()
|
boolean |
isStarted()
Method to determine whether the Service is started or not. |
void |
messageArrived(MessageHandle handle)
By this method the implementing object is informed of an arrived message. |
void |
registerEventParser(EventHandle eh,
java.lang.Class cl)
Method to register a parser for a custom event. |
void |
removeEventListener(EventListener listener)
Method to remove an org.demac.event.EventListener for all org.demac.event.Events from the EventService. |
void |
removeEventListener(EventListener listener,
EventHandle eh)
Method to remove an org.demac.event.EventListener for an specific org.demac.event.Event from the EventService. |
void |
start()
Method to start the service. |
void |
stop()
Method to stop the service. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static EventService getEventService()
public void addEventListener(DeviceHandle dh, EventListener el, EventHandle eh)
EventService
addEventListener
in class EventService
dh
- the handle of the device where to register the eventel
- the listener to registerpublic void addEventListener(EventListener listener, EventHandle eh)
EventService
addEventListener
in class EventService
listener
- the listener to registerorg.demac.event.EventService#addEventListener(org.demac.event.EventListener, org.demac.event.Event)
public void removeEventListener(EventListener listener)
EventService
removeEventListener
in class EventService
listener
- the listener which should be removed from the serviceEventService.removeEventListener(org.demac.event.EventListener)
public void removeEventListener(EventListener listener, EventHandle eh)
EventService
removeEventListener
in class EventService
listener
- the listener which should be removed from the serviceeh
- the event for which the listener should be removedorg.demac.event.EventService#removeEventListener(org.demac.event.EventListener, org.demac.event.Event)
public void dispatchEvent(Event ev)
EventService
dispatchEvent
in class EventService
ev
- the event which is to be dispatched.EventService.dispatchEvent(org.demac.event.Event)
public void start()
Service
start
in interface Service
Service.start()
public void stop()
Service
stop
in interface Service
Service.stop()
public void messageArrived(MessageHandle handle)
TransportListener
messageArrived
in interface TransportListener
handle
- the handle of the arrived messageTransportListener.messageArrived(org.demac.transport.MessageHandle)
public void deviceDetected(Device device)
TransportListener
deviceDetected
in interface TransportListener
device
- the device which was detectedTransportListener.deviceDetected(org.demac.transport.Device)
public void registerEventParser(EventHandle eh, java.lang.Class cl) throws java.lang.IllegalArgumentException
EventService
registerEventParser
in class EventService
eh
- the handle of the event that is assosiated to the parsercl
- 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 constructorpublic void exceptionOccured(TransportException arg0)
TransportListener
exceptionOccured
in interface TransportListener
arg0
- the occured exceptionpublic void deviceRemoved(Device arg0)
TransportListener
deviceRemoved
in interface TransportListener
arg0
- the device which was removedpublic boolean isStarted()
Service
isStarted
in interface Service
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |