public class EventServiceImplementation extends Object implements EventService
Modifier and Type | Field and Description |
---|---|
protected List<Class> |
eventCodeDescriptors |
protected Collection<EventListener> |
globalListeners |
protected Hashtable<String,EventListener> |
keyedListeners |
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 |
addListener(String threadPrefix,
EventListener listener)
Deprecated.
keyed listener support based on thread name/prefix will be removed in the next major release.
|
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
|
void |
removeListener(String threadPrefix)
Deprecated.
keyed listener support based on thread name/prefix will be removed in the next major release.
|
protected static void |
setInstance(EventService eventService)
Allow alternative event service to set.
|
void |
setProcessAllEventsOnEventException(boolean processAllEventsOnEventException) |
protected final Hashtable<String,EventListener> keyedListeners
protected Collection<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
@Deprecated public void addListener(String threadPrefix, EventListener listener)
addListener
in interface EventService
threadPrefix
- listen to threads whose name have this prefix, string must not contain any '-' except the final character which must be a '-'.listener
- @Deprecated public void removeListener(String threadPrefix)
removeListener
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 © 2024. All rights reserved.