org.xwiki.observation
Class AbstractEventListener

java.lang.Object
  extended by org.xwiki.observation.AbstractEventListener
All Implemented Interfaces:
EventListener

public abstract class AbstractEventListener
extends Object
implements EventListener

Base class for EventListeners.

Since:
5.4RC1
Version:
$Id: d07cd543a6849616f1626f490fdc540c6b405402 $

Constructor Summary
AbstractEventListener(String name, Event... events)
           
AbstractEventListener(String name, List<Event> events)
           
 
Method Summary
 List<Event> getEvents()
           
 String getName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xwiki.observation.EventListener
onEvent
 

Constructor Detail

AbstractEventListener

public AbstractEventListener(String name,
                             List<Event> events)
Parameters:
name - the listener's name. It's a free form text identifying this listener instance in a unique manner. This name is used for some operations in ObservationManager.
events - the list of events this listener is configured to receive. This listener will be automatically registered with this list of events against the ObservationManager. When an event occurs, for each matching event in this list, the EventListener.onEvent(Event, Object, Object) method will be called.

AbstractEventListener

public AbstractEventListener(String name,
                             Event... events)
Parameters:
name - the listener's name. It's a free form text identifying this listener instance in a unique manner. This name is used for some operations in ObservationManager.
events - the list of events this listener is configured to receive. This listener will be automatically registered with this list of events against the ObservationManager. When an event occurs, for each matching event in this list, the EventListener.onEvent(Event, Object, Object) method will be called.
Method Detail

getName

public String getName()
Specified by:
getName in interface EventListener
Returns:
the listener's name. It's a free form text identifying this listener instance in a unique manner. This name is used for some operations in ObservationManager.

getEvents

public List<Event> getEvents()
Specified by:
getEvents in interface EventListener
Returns:
the list of events this listener is configured to receive. This listener will be automatically registered with this list of events against the ObservationManager. When an event occurs, for each matching event in this list, the EventListener.onEvent(Event, Object, Object) method will be called.


Copyright © 2004–2014 XWiki. All rights reserved.