Package org.smooks.engine.delivery.event
Class BasicExecutionEventListener
- java.lang.Object
-
- org.smooks.engine.delivery.event.BasicExecutionEventListener
-
- All Implemented Interfaces:
org.smooks.api.delivery.event.ExecutionEventListener
- Direct Known Subclasses:
AbstractReportGenerator
public class BasicExecutionEventListener extends Object implements org.smooks.api.delivery.event.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 theExecutionEventListenerinterface 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<org.smooks.api.delivery.event.ExecutionEvent>getEvents()Get theExecutionEventlist.protected booleanignoreEvent(org.smooks.api.delivery.event.ExecutionEvent event)voidonEvent(org.smooks.api.delivery.event.ExecutionEvent executionEvent)Process theExecutionEvent.voidsetFilterEvents(Class<? extends org.smooks.api.delivery.event.ExecutionEvent>... filterEvents)Set a list ofeventtypes on which to filter.
-
-
-
Method Detail
-
setFilterEvents
public void setFilterEvents(Class<? extends org.smooks.api.delivery.event.ExecutionEvent>... filterEvents)
Set a list ofeventtypes on which to filter. The listener will only captureeventtypes provided in this list. If not set, all events will be captured.- Parameters:
filterEvents- Filter events.
-
onEvent
public void onEvent(org.smooks.api.delivery.event.ExecutionEvent executionEvent)
Process theExecutionEvent.- Specified by:
onEventin interfaceorg.smooks.api.delivery.event.ExecutionEventListener- Parameters:
executionEvent- TheExecutionEvent.
-
ignoreEvent
protected boolean ignoreEvent(org.smooks.api.delivery.event.ExecutionEvent event)
-
getEvents
public List<org.smooks.api.delivery.event.ExecutionEvent> getEvents()
Get theExecutionEventlist.- Returns:
- The
ExecutionEventlist.
-
-