org.milyn.event
Class BasicExecutionEventListener

java.lang.Object
  extended by org.milyn.event.BasicExecutionEventListener
All Implemented Interfaces:
ExecutionEventListener
Direct Known Subclasses:
AbstractReportGenerator

public class BasicExecutionEventListener
extends Object
implements ExecutionEventListener

Basic ExecutionEventListener.

This event listener listens to and captures published events. The list of captured events can be filtered by setting a list of filter event types.

This listener should be used with great care. It could quite easily consume large amounts of memory if not used properly. If access to this information is required in a production environment, consider writing and using a more specialized implementation of the ExecutionEventListener interface i.e. an implementation that captures the information in a more memory-friendly way.

Author:
tom.fennelly@gmail.com

Constructor Summary
BasicExecutionEventListener()
           
 
Method Summary
 List<ExecutionEvent> getEvents()
          Get the ExecutionEvent list.
protected  boolean ignoreEvent(ExecutionEvent event)
           
 void onEvent(ExecutionEvent event)
          Process the ExecutionEvent.
 void setFilterEvents(Class<? extends ExecutionEvent>... filterEvents)
          Set a list of event types on which to filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicExecutionEventListener

public BasicExecutionEventListener()
Method Detail

setFilterEvents

public void setFilterEvents(Class<? extends ExecutionEvent>... filterEvents)
Set a list of event types on which to filter.

The listener will only capture event types provided in this list. If not set, all events will be captured.

Parameters:
filterEvents - Filter events.

onEvent

public void onEvent(ExecutionEvent event)
Process the ExecutionEvent.

Specified by:
onEvent in interface ExecutionEventListener
Parameters:
event - The ExecutionEvent.

ignoreEvent

protected boolean ignoreEvent(ExecutionEvent event)

getEvents

public List<ExecutionEvent> getEvents()
Get the ExecutionEvent list.

Returns:
The ExecutionEvent list.


Copyright © 2008. All Rights Reserved.