Class AbstractThreadEventListener

  • All Implemented Interfaces:
    EventListener
    Direct Known Subclasses:
    WrappedThreadEventListener

    public abstract class AbstractThreadEventListener
    extends Object
    implements EventListener
    Filter events by keeping only events produced by the provided Thread.
    Since:
    3.2M3
    Version:
    $Id: 50b106ccae4955b72d841da0d42a0aea98d374bc $
    • Constructor Detail

      • AbstractThreadEventListener

        public AbstractThreadEventListener​(Thread thread)
        Parameters:
        thread - the thread to match to receive events.
    • Method Detail

      • onEvent

        public void onEvent​(Event event,
                            Object source,
                            Object data)
        Description copied from interface: EventListener
        The ObservationManager calls this method when an event matches one of the events for which this listener is registered (see EventListener.getEvents().
        Specified by:
        onEvent in interface EventListener
        Parameters:
        event - the event triggered. Can be used to differentiate different events if your Object supports several events for example.
        source - the event source i.e. the object for which the event was triggered. For example this would be the document Object if the event is a document update event.
        data - some additional and optional data passed that can be acted on.
      • onEventInternal

        protected abstract void onEventInternal​(Event event,
                                                Object source,
                                                Object data)
        Called when the event has been produce by the proper Thread.
        Parameters:
        event - the event triggered. Can be used to differentiate different events if your Object supports several events for example.
        source - the event source i.e. the object for which the event was triggered. For example this would be the document Object if the event is a document update event.
        data - some additional and optional data passed that can be acted on.