public interface

ListenerInvoker

com.atlassian.event.spi.ListenerInvoker

Class Overview

Implementation of this interface know how to invoke 'given types' of listeners so that they handle given events.

Note: Implementations MUST provide correct implementations of the #equals(Object) and #hashCode() method.

Summary

Public Methods
abstract Set<Class<?>> getSupportedEventTypes()
The types of events supported by this invoker.
abstract void invoke(Object event)
Invokes the underlying listener for the given event.
abstract boolean supportAsynchronousEvents()
Whether or not the underlying listener can handle asynchronous event.

Public Methods

public abstract Set<Class<?>> getSupportedEventTypes ()

The types of events supported by this invoker. I.e. invoke(Object) can be safely called with any object that is an instance of at least one of those types.

Returns
  • the set of supported event types.

public abstract void invoke (Object event)

Invokes the underlying listener for the given event.

Parameters
event the event to tell the listener about.
Throws
IllegalArgumentException if the event is not an instance of any of the types returned by getSupportedEventTypes()

public abstract boolean supportAsynchronousEvents ()

Whether or not the underlying listener can handle asynchronous event.

Returns
  • true if the underlying listener can handle asynchronous events, false otherwise