|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.event.internal.EventPublisherImpl
public final class EventPublisherImpl
The default implementation of the EventPublisher interface.
One can customise the event listening by instantiating with custom
listener handlers and the event dispatching through
EventDispatcher. See the com.atlassian.event.spi package
for more information.
ListenerHandler,
EventDispatcher| Constructor Summary | |
|---|---|
EventPublisherImpl(EventDispatcher eventDispatcher,
ListenerHandlersConfiguration listenerHandlersConfiguration)
If you need to customise the asynchronous handling, you should use the AsynchronousAbleEventDispatcher together with a custom executor. |
|
| Method Summary | |
|---|---|
void |
publish(java.lang.Object event)
Publish an event that will be consumed by all listeners which have registered to receive it. |
void |
register(java.lang.Object listener)
Register a listener to receive events. |
void |
unregister(java.lang.Object listener)
Un-register a listener so that it will no longer receive events. |
void |
unregisterAll()
Un-register all listeners that this publisher knows about. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventPublisherImpl(EventDispatcher eventDispatcher,
ListenerHandlersConfiguration listenerHandlersConfiguration)
If you need to customise the asynchronous handling, you should use the
AsynchronousAbleEventDispatcher together with a custom executor. You might
also want to have a look at using the EventThreadFactory to keep the naming
of event threads consistent with the default naming of the Atlassian Event library.
eventDispatcher - the event dispatcher to be used with the publisherlistenerHandlersConfiguration - the list of listener handlers to be used with this publisherAsynchronousAbleEventDispatcher,
EventThreadFactory| Method Detail |
|---|
public void publish(java.lang.Object event)
EventPublisherEventListener and one argument which is assignable from the event type (i.e. a superclass
or interface implemented by the event object). Implementations may also dispatch events
to legacy EventListener implementations based on the types returned
from EventListener.getHandledEventClasses().
This method should process all event listeners, despite any errors or exceptions that are generated
as a result of dispatching the event.
publish in interface EventPublisherevent - the event to publishpublic void register(java.lang.Object listener)
EventPublisherEventListener annotation. Legacy
implementations may also support listeners which implement the now-deprecated
EventListener interface.
register in interface EventPublisherlistener - The listener that is being registeredannotation which can be used to indicate event listener methodspublic void unregister(java.lang.Object listener)
EventPublisher
unregister in interface EventPublisherlistener - The listener to un-registerpublic void unregisterAll()
EventPublisher
unregisterAll in interface EventPublisher
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||