Class FlowEventListenerSubject
- java.lang.Object
-
- org.ikasan.testharness.flow.listener.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 voidaddObserver(FlowObserver flowObserver)Add the specified observervoidafterFlowElement(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.voidbeforeFlowElement(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.voidremoveAllObservers()Remove all observersvoidremoveObserver(FlowObserver flowObserver)Remove the specified observervoidsetIgnoreEventCapture(boolean ignoreEventCapture)Allow override of the event capture status.
-
-
-
Method Detail
-
setIgnoreEventCapture
public void setIgnoreEventCapture(boolean ignoreEventCapture)
Allow override of the event capture status.- Specified by:
setIgnoreEventCapturein interfaceFlowSubject- 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:
beforeFlowElementin interfaceorg.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:
afterFlowElementin interfaceorg.ikasan.spec.flow.FlowEventListener- Parameters:
moduleName-flowName-flowElement-event-
-
addObserver
public void addObserver(FlowObserver flowObserver)
Add the specified observer- Specified by:
addObserverin interfaceFlowSubject- Parameters:
flowObserver-
-
removeObserver
public void removeObserver(FlowObserver flowObserver)
Remove the specified observer- Specified by:
removeObserverin interfaceFlowSubject- Parameters:
flowObserver-
-
removeAllObservers
public void removeAllObservers()
Remove all observers- Specified by:
removeAllObserversin interfaceFlowSubject
-
-