EventListenerRegistryService¶
-
public interface
EventListenerRegistryService
¶ Gives access to the registry of listeners for Motech events. This interface is necessary for OSGi service publication. One can register themselves to listen for a specific set of event’s subject.
Methods¶
clearListenersForBean¶
getListenerCount¶
getListeners¶
-
Set<EventListener>
getListeners
(String subject)¶ Returns all the event listeners registered for the event with the given subject. If there are no listeners, an empty list is returned.
Parameters: - subject – the subject of the event
Returns: the matching event listeners
hasListener¶
registerListener¶
-
void
registerListener
(EventListener listener, List<String> subjects)¶ Registers the event listener to be notified when events with the matching subject are received via the Server JMS Event Queue.
Parameters: - listener – the listener to be registered
- subjects – the list of subjects the listener subscribes to, wildcards are allowed
registerListener¶
-
void
registerListener
(EventListener listener, String subject)¶ Registers the event listener to be notified when the event’s subjects are received via the Server JMS Event Queue.
Parameters: - listener – the listener to be registered
- subject – the subject the listener subscribes to, wildcards are allowed