EventPublisherImpl directly.@Deprecated public final class LockFreeEventPublisher extends Object implements EventPublisher
EventPublisher interface.| Constructor and Description |
|---|
LockFreeEventPublisher(EventDispatcher eventDispatcher,
ListenerHandlersConfiguration configuration)
Deprecated.
|
LockFreeEventPublisher(EventDispatcher eventDispatcher,
ListenerHandlersConfiguration listenerHandlersConfiguration,
InvokerTransformer transformer)
Deprecated.
|
LockFreeEventPublisher(EventDispatcher eventDispatcher,
ListenerHandlersConfiguration configuration,
com.atlassian.plugin.scope.ScopeManager scopeManager)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
publish(Object event)
Deprecated.
Publish an event that will be consumed by all listeners which have registered to receive it.
|
void |
register(Object listener)
Deprecated.
Register a listener to receive events.
|
void |
unregister(Object listener)
Deprecated.
Un-register a listener so that it will no longer receive events.
|
void |
unregisterAll()
Deprecated.
Un-register all listeners that this registrar knows about.
|
public LockFreeEventPublisher(EventDispatcher eventDispatcher, ListenerHandlersConfiguration configuration, com.atlassian.plugin.scope.ScopeManager scopeManager)
public LockFreeEventPublisher(EventDispatcher eventDispatcher, ListenerHandlersConfiguration configuration)
public LockFreeEventPublisher(EventDispatcher eventDispatcher, ListenerHandlersConfiguration listenerHandlersConfiguration, InvokerTransformer transformer)
public void publish(@Nonnull 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.
After walking the class hierarchy the interface listeners are invoked, again from the most specific interface first. Note that the ordering within a specific event type is not guaranteed. If there are multiple registered listeners for IssueEvent, then they will be invoked in the order of registration. It is however guaranteed that a listener for IssueEvent will be invoked before a listener for Event
EventListener.order(). Event listeners with order defined are
overriding default rules and will be processed in ascending order of the EventListener.order() value.
Default ordering is preserved when processing event listeners with the same EventListener.order() value.
There is a soft rule for plugin event listeners to use order values in range [-1000, 1000] if needed.
Values in following ranges: [Integer.MIN_VALUE, -1000) and (1000, Integer.MAX_VALUE] are reserved
for Atlassian product internal event listeners.publish in interface EventPublisherevent - the event to publishpublic void register(@Nonnull Object listener)
EventListenerRegistrarEventListener annotation. Legacy
implementations may also support listeners which implement the now-deprecated
EventListener interface.register in interface EventListenerRegistrarlistener - The listener that is being registeredannotation which can be used to indicate event listener methodspublic void unregister(@Nonnull Object listener)
EventListenerRegistrarunregister in interface EventListenerRegistrarlistener - The listener to un-registerpublic void unregisterAll()
EventListenerRegistrarunregisterAll in interface EventListenerRegistrarCopyright © 2006–2022 Atlassian. All rights reserved.