public class EventServiceImplementation extends java.lang.Object implements EventService
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<java.lang.Class> |
eventCodeDescriptors |
protected java.util.Collection<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
|
java.lang.String |
getEventName(java.lang.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(java.lang.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 java.util.Collection<EventListener> globalListeners
protected java.util.List<java.lang.Class> eventCodeDescriptors
protected static void setInstance(EventService eventService)
public static EventService getInstance()
public void registerEventCodeDescriptor(java.lang.Class cls)
EventServiceregisterEventCodeDescriptor in interface EventServicepublic java.lang.String getEventName(java.lang.Integer id)
EventServicegetEventName in interface EventServicepublic void fireEvent(Event evt)
fireEvent in interface EventServiceevt - event to fire to all listenerpublic void setProcessAllEventsOnEventException(boolean processAllEventsOnEventException)
public void addListener(EventListener listener)
EventServiceaddListener in interface EventServicelistener - listener to addpublic void removeListener(EventListener listener)
EventServiceremoveListener in interface EventServiceCopyright © 2022. All rights reserved.