com.hammurapi.flow.runtime.impl
Class TaskCountingFlowBase<N extends Node<P,K,S,A>,T extends Transition<S,A>,P,K,S,A>

java.lang.Object
  extended by com.hammurapi.flow.runtime.impl.FlowBase<N,T,P,K,S,A>
      extended by com.hammurapi.flow.runtime.impl.TaskCountingFlowBase<N,T,P,K,S,A>
Type Parameters:
N - Node type.
T - Transition type.
P - Pin configuration type.
K - Connect key type.
S - Flow state type.
A - Argument type.
All Implemented Interfaces:
Component<Flow>, Flow<N,T,P,K,S,A>, FlowElement, Node<P,K,S,A>, TaskCounter

public abstract class TaskCountingFlowBase<N extends Node<P,K,S,A>,T extends Transition<S,A>,P,K,S,A>
extends FlowBase<N,T,P,K,S,A>

Flow which counts processing tasks and has join() method to wait till all tasks finish.

Author:
Pavel Vlasov

Field Summary
 
Fields inherited from class com.hammurapi.flow.runtime.impl.FlowBase
nodes, transitions
 
Constructor Summary
TaskCountingFlowBase()
           
 
Method Summary
 void join()
          This method blocks until all flow processing tasks finish execution.
 void onTaskCreated(Runnable task)
           
 void onTaskFinished(Runnable task)
           
 
Methods inherited from class com.hammurapi.flow.runtime.impl.FlowBase
afterConnect, beforeConnect, connect, convertResult, createFlowState, getFacade, getInternalInvocable, getInternalInvoker, getSynapseConfig, getSynapseFactory, init, setFacadeInterface, setNodes, setSynapseFactory, setTransitions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hammurapi.flow.runtime.Flow
setBackEnd
 
Methods inherited from interface com.hammurapi.flow.runtime.Node
addPin, getInvocable, getInvoker
 

Constructor Detail

TaskCountingFlowBase

public TaskCountingFlowBase()
Method Detail

onTaskCreated

public void onTaskCreated(Runnable task)

onTaskFinished

public void onTaskFinished(Runnable task)

join

public void join()
          throws InterruptedException
This method blocks until all flow processing tasks finish execution.

Throws:
InterruptedException