Class FlowEventListenerSubject

  • All Implemented Interfaces:
    org.ikasan.spec.flow.FlowEventListener, FlowSubject

    public class FlowEventListenerSubject
    extends java.lang.Object
    implements org.ikasan.spec.flow.FlowEventListener, FlowSubject
    Captures all component and event activity in this flow by implementing the Ikasan Framework FlowEventListener. The FlowSubject implementation states that this class will be observable by one or more registered observers.
    Author:
    Ikasan Development Team
    • Constructor Summary

      Constructors 
      Constructor Description
      FlowEventListenerSubject​(org.ikasan.spec.event.ReplicationFactory<org.ikasan.spec.flow.FlowEvent> replicationFactory)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addObserver​(FlowObserver flowObserver)
      Add the specified observer
      void afterFlowElement​(java.lang.String moduleName, java.lang.String flowName, org.ikasan.spec.flow.FlowElement flowElement, org.ikasan.spec.flow.FlowEvent event)
      Captures the details of the flow component and event in flight.
      void beforeFlowElement​(java.lang.String moduleName, java.lang.String flowName, org.ikasan.spec.flow.FlowElement flowElement, org.ikasan.spec.flow.FlowEvent event)
      Does nothing in this implementation as we are only interested in the afterFlowElement operations for event capture.
      protected java.util.List<FlowObserver> initFlowObservers()
      Utility method for initialising the flow observers list implemented for ease of testing.
      void removeAllObservers()
      Remove all observers
      void removeObserver​(FlowObserver flowObserver)
      Remove the specified observer
      void setIgnoreEventCapture​(boolean ignoreEventCapture)
      Allow override of the event capture status.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FlowEventListenerSubject

        public FlowEventListenerSubject​(org.ikasan.spec.event.ReplicationFactory<org.ikasan.spec.flow.FlowEvent> replicationFactory)
        Constructor
    • Method Detail

      • setIgnoreEventCapture

        public void setIgnoreEventCapture​(boolean ignoreEventCapture)
        Allow override of the event capture status.
        Specified by:
        setIgnoreEventCapture in interface FlowSubject
        Parameters:
        ignoreEventCapture -
      • initFlowObservers

        protected java.util.List<FlowObserver> initFlowObservers()
        Utility method for initialising the flow observers list implemented for ease of testing.
        Returns:
      • beforeFlowElement

        public void beforeFlowElement​(java.lang.String moduleName,
                                      java.lang.String flowName,
                                      org.ikasan.spec.flow.FlowElement flowElement,
                                      org.ikasan.spec.flow.FlowEvent event)
        Does nothing in this implementation as we are only interested in the afterFlowElement operations for event capture.
        Specified by:
        beforeFlowElement in interface org.ikasan.spec.flow.FlowEventListener
        Parameters:
        moduleName -
        flowName -
        flowElement -
        event -
      • afterFlowElement

        public void afterFlowElement​(java.lang.String moduleName,
                                     java.lang.String flowName,
                                     org.ikasan.spec.flow.FlowElement flowElement,
                                     org.ikasan.spec.flow.FlowEvent event)
        Captures the details of the flow component and event in flight.
        Specified by:
        afterFlowElement in interface org.ikasan.spec.flow.FlowEventListener
        Parameters:
        moduleName -
        flowName -
        flowElement -
        event -
      • addObserver

        public void addObserver​(FlowObserver flowObserver)
        Add the specified observer
        Specified by:
        addObserver in interface FlowSubject
        Parameters:
        flowObserver -
      • removeObserver

        public void removeObserver​(FlowObserver flowObserver)
        Remove the specified observer
        Specified by:
        removeObserver in interface FlowSubject
        Parameters:
        flowObserver -