public interface

EventListener

com.atlassian.event.EventListener
Known Indirect Subclasses

This interface is deprecated.
since 2.0, you can now use a POJO annotated with EventListener and the EventPublisher

Class Overview

Defines a listener for events.

Summary

Public Methods
abstract Class[] getHandledEventClasses()
Determine which event classes this listener is interested in.
abstract void handleEvent(Event event)
Perform some action as a response to a Confluence event.

Public Methods

public abstract Class[] getHandledEventClasses ()

Determine which event classes this listener is interested in.

The EventManager performs rudimentary filtering of events by their class. If you want to receive only a subset of events passing through the system, return an array of the Classes you wish to listen for from this method.

Listening for a class will also listen for all its subclasses. (And listening for an interface will listen for any implementation of that interface)

Returning an empty array will allow you to receive every event.

Returns
  • An array of the event classes that this event listener is interested in, or an empty array if the listener should receive all events. Must not return null.

public abstract void handleEvent (Event event)

Perform some action as a response to a Confluence event. The EventManager will ensure that this is only called if the class of the event matches one of the classes returned by getHandledEventClasses

Parameters
event some event triggered within Confluence