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)
EventServiceregisterEventCodeDescriptor in interface EventServicepublic String getEventName(Integer id)
EventServicegetEventName in interface EventService@Deprecated public void addListener(String threadPrefix, EventListener listener)
addListener in interface EventServicethreadPrefix - 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 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 © 2025. All rights reserved.