com.atlassian.event.api
Interface EventPublisher

All Superinterfaces:
EventListenerRegistrar
All Known Implementing Classes:
EventPublisherImpl, LockFreeEventPublisher

public interface EventPublisher
extends EventListenerRegistrar

Interface to publish events. It allows the decoupling of listeners which handle events and publishers which dispatch events.

Since:
2.0
See Also:
annotation which can be used to indicate event listener methods

Method Summary
 void publish(java.lang.Object event)
          Publish an event that will be consumed by all listeners which have registered to receive it.
 
Methods inherited from interface com.atlassian.event.api.EventListenerRegistrar
register, unregister, unregisterAll
 

Method Detail

publish

void publish(java.lang.Object event)
Publish an event that will be consumed by all listeners which have registered to receive it. Implementations must dispatch events to listeners which have a public method annotated with EventListener 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.

Parameters:
event - the event to publish
Throws:
java.lang.NullPointerException - if the event is null


Copyright © 2006-2013 Atlassian. All Rights Reserved.