Package org.smooks.engine.delivery.event
Class BasicExecutionEventListener
- java.lang.Object
-
- org.smooks.engine.delivery.event.BasicExecutionEventListener
-
- All Implemented Interfaces:
ExecutionEventListener
- Direct Known Subclasses:
AbstractReportGenerator
public class BasicExecutionEventListener extends Object implements ExecutionEventListener
BasicExecutionEventListener
. This event listener listens to and captures published events. The list of captured events can be filtered by setting a list offilter 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 theExecutionEventListener
interface i.e. an implementation that captures the information in a more memory-friendly way.- Author:
- tom.fennelly@gmail.com
-
-
Constructor Summary
Constructors Constructor Description BasicExecutionEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ExecutionEvent>
getEvents()
Get theExecutionEvent
list.protected boolean
ignoreEvent(ExecutionEvent event)
void
onEvent(ExecutionEvent executionEvent)
Process theExecutionEvent
.void
setFilterEvents(Class<? extends ExecutionEvent>... filterEvents)
Set a list ofevent
types on which to filter.
-
-
-
Method Detail
-
setFilterEvents
public void setFilterEvents(Class<? extends ExecutionEvent>... filterEvents)
Set a list ofevent
types on which to filter. The listener will only captureevent
types provided in this list. If not set, all events will be captured.- Parameters:
filterEvents
- Filter events.
-
onEvent
public void onEvent(ExecutionEvent executionEvent)
Process theExecutionEvent
.- Specified by:
onEvent
in interfaceExecutionEventListener
- Parameters:
executionEvent
- TheExecutionEvent
.
-
ignoreEvent
protected boolean ignoreEvent(ExecutionEvent event)
-
getEvents
public List<ExecutionEvent> getEvents()
Get theExecutionEvent
list.- Returns:
- The
ExecutionEvent
list.
-
-