public class EventServiceImplementation extends Object implements EventService
Modifier and Type | Field and Description |
---|---|
protected Vector<Class> |
eventCodeDescriptors |
protected Vector<EventListener> |
globalListeners |
Modifier | Constructor and Description |
---|---|
protected |
EventServiceImplementation() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(EventListener listener)
Add an EventListener to the list of objects that will be sent Events.
|
void |
fireEvent(Event evt)
Send an SSH Event to each registered listener
|
String |
getEventName(Integer id)
Get an event name from the registered event code descriptors (debug use only)
|
static EventService |
getInstance()
Get the event service instance
|
void |
registerEventCodeDescriptor(Class cls)
Register an event code descriptor (debug use only)
|
void |
removeListener(EventListener listener)
Remove an EventListener
|
protected static void |
setInstance(EventService eventService)
Allow alternative event service to set.
|
void |
setProcessAllEventsOnEventException(boolean processAllEventsOnEventException) |
protected Vector<EventListener> globalListeners
protected static void setInstance(EventService eventService)
public static EventService getInstance()
public void registerEventCodeDescriptor(Class cls)
EventService
registerEventCodeDescriptor
in interface EventService
public String getEventName(Integer id)
EventService
getEventName
in interface EventService
public void fireEvent(Event evt)
fireEvent
in interface EventService
evt
- event to fire to all listenerpublic void setProcessAllEventsOnEventException(boolean processAllEventsOnEventException)
public void addListener(EventListener listener)
EventService
addListener
in interface EventService
listener
- listener to addpublic void removeListener(EventListener listener)
EventService
removeListener
in interface EventService
Copyright © 2016. All rights reserved.