Class 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
    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 Detail

      • BasicExecutionEventListener

        public BasicExecutionEventListener()
    • Method Detail

      • setFilterEvents

        public void setFilterEvents​(Class<? extends org.smooks.api.delivery.event.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​(org.smooks.api.delivery.event.ExecutionEvent executionEvent)
        Process the ExecutionEvent.
        Specified by:
        onEvent in interface org.smooks.api.delivery.event.ExecutionEventListener
        Parameters:
        executionEvent - The ExecutionEvent.
      • ignoreEvent

        protected boolean ignoreEvent​(org.smooks.api.delivery.event.ExecutionEvent event)
      • getEvents

        public List<org.smooks.api.delivery.event.ExecutionEvent> getEvents()
        Get the ExecutionEvent list.
        Returns:
        The ExecutionEvent list.