Class ConcurrentSplitterFlowElementInvoker
- java.lang.Object
-
- org.ikasan.flow.visitorPattern.invoker.AbstractFlowElementInvoker<ConcurrentSplitterInvokerConfiguration>
-
- org.ikasan.flow.visitorPattern.invoker.ConcurrentSplitterFlowElementInvoker
-
- All Implemented Interfaces:
org.ikasan.spec.configuration.Configured<ConcurrentSplitterInvokerConfiguration>,org.ikasan.spec.configuration.ConfiguredResource<ConcurrentSplitterInvokerConfiguration>,org.ikasan.spec.flow.FlowElementInvoker<org.ikasan.spec.component.splitting.Splitter>,org.ikasan.spec.management.ManagedService
public class ConcurrentSplitterFlowElementInvoker extends AbstractFlowElementInvoker<ConcurrentSplitterInvokerConfiguration> implements org.ikasan.spec.flow.FlowElementInvoker<org.ikasan.spec.component.splitting.Splitter>, org.ikasan.spec.management.ManagedService
A default implementation of the FlowElementInvoker for a concurrent splitter This invokes a subFlow concurrently, using an ExecutorService, for each element of the resulting split, then continues with the main flow in the current thread- Author:
- Ikasan Development Team
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classConcurrentSplitterFlowElementInvoker.SplitFlowCallbackprotected classConcurrentSplitterFlowElementInvoker.SplitFlowElementConcurrent executions
-
Field Summary
-
Fields inherited from class org.ikasan.flow.visitorPattern.invoker.AbstractFlowElementInvoker
configuration, configuredResourceId, flowInvocationContextListeners, ignoreContextInvocation, invokeContextListeners
-
-
Constructor Summary
Constructors Constructor Description ConcurrentSplitterFlowElementInvoker(java.util.concurrent.ExecutorService executorService)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()java.lang.StringgetInvokerType()org.ikasan.spec.flow.FlowElementinvoke(java.util.List<org.ikasan.spec.flow.FlowEventListener> flowEventListeners, java.lang.String moduleName, java.lang.String flowName, org.ikasan.spec.flow.FlowInvocationContext flowInvocationContext, org.ikasan.spec.flow.FlowEvent flowEvent, org.ikasan.spec.flow.FlowElement<org.ikasan.spec.component.splitting.Splitter> flowElement)protected ConcurrentSplitterFlowElementInvoker.SplitFlowElementnewAsyncTask(org.ikasan.spec.flow.FlowElement nextFlowElementInRoute, java.util.List<org.ikasan.spec.flow.FlowEventListener> flowEventListeners, java.lang.String moduleName, java.lang.String flowName, org.ikasan.spec.flow.FlowInvocationContext flowInvocationContext, org.ikasan.spec.flow.FlowEvent flowEvent)Factory method to aid testing.protected booleanpendingCallback(java.util.List payloads, java.util.concurrent.atomic.AtomicInteger count)Allows for easier testing-
Methods inherited from class org.ikasan.flow.visitorPattern.invoker.AbstractFlowElementInvoker
getConfiguration, getConfiguredResourceId, notifyFlowInvocationContextListenersSnapEvent, setConfiguration, setConfiguredResourceId, setFlowInvocationContextListeners, setIgnoreContextInvocation, setInvokeContextListeners
-
-
-
-
Method Detail
-
getInvokerType
public java.lang.String getInvokerType()
- Specified by:
getInvokerTypein interfaceorg.ikasan.spec.flow.FlowElementInvoker<org.ikasan.spec.component.splitting.Splitter>
-
invoke
public org.ikasan.spec.flow.FlowElement invoke(java.util.List<org.ikasan.spec.flow.FlowEventListener> flowEventListeners, java.lang.String moduleName, java.lang.String flowName, org.ikasan.spec.flow.FlowInvocationContext flowInvocationContext, org.ikasan.spec.flow.FlowEvent flowEvent, org.ikasan.spec.flow.FlowElement<org.ikasan.spec.component.splitting.Splitter> flowElement)- Specified by:
invokein interfaceorg.ikasan.spec.flow.FlowElementInvoker<org.ikasan.spec.component.splitting.Splitter>
-
pendingCallback
protected boolean pendingCallback(java.util.List payloads, java.util.concurrent.atomic.AtomicInteger count)Allows for easier testing- Parameters:
payloads-- Returns:
-
newAsyncTask
protected ConcurrentSplitterFlowElementInvoker.SplitFlowElement newAsyncTask(org.ikasan.spec.flow.FlowElement nextFlowElementInRoute, java.util.List<org.ikasan.spec.flow.FlowEventListener> flowEventListeners, java.lang.String moduleName, java.lang.String flowName, org.ikasan.spec.flow.FlowInvocationContext flowInvocationContext, org.ikasan.spec.flow.FlowEvent flowEvent)
Factory method to aid testing.- Parameters:
nextFlowElementInRoute-flowEventListeners-moduleName-flowName-flowInvocationContext-flowEvent-- Returns:
-
destroy
public void destroy()
- Specified by:
destroyin interfaceorg.ikasan.spec.management.ManagedService
-
-