com.hammurapi.flow.runtime
Interface Flow<N extends Node<P,K,S,A>,T extends Transition<S,A>,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 Superinterfaces:
FlowElement, Node<P,K,S,A>

public interface Flow<N extends Node<P,K,S,A>,T extends Transition<S,A>,P,K,S,A>
extends Node<P,K,S,A>

Flows shall implement this interface.

Author:
Pavel Vlasov

Method Summary
 void connect(int nodeIdx, String pinName, int transitionIdx, boolean isInbound, K connectKey)
          Connects contents of the flow (internal nodes).
 Object getFacade()
           
 void setBackEnd(Object object)
          Sets back-end object (optional operation).
 void setFacadeInterface(Class<?> facadeInterface)
          Configuration runtime injects facade interface class into flow using this method.
 void setNodes(List<N> nodes)
          Configuration runtime injects node instances into flow using this method.
 void setTransitions(List<T> transitions)
          Configuration runtime injects transition instances into flow using this method.
 
Methods inherited from interface com.hammurapi.flow.runtime.Node
addPin, getInvocable, getInvoker
 
Methods inherited from interface com.hammurapi.flow.runtime.FlowElement
afterConnect, beforeConnect
 

Method Detail

setNodes

void setNodes(List<N> nodes)
              throws ConfigurationException
Configuration runtime injects node instances into flow using this method.

Parameters:
nodes - Nodes.
Throws:
ConfigurationException

setTransitions

void setTransitions(List<T> transitions)
                    throws ConfigurationException
Configuration runtime injects transition instances into flow using this method.

Parameters:
transitions -
Throws:
ConfigurationException

setFacadeInterface

void setFacadeInterface(Class<?> facadeInterface)
Configuration runtime injects facade interface class into flow using this method.

Parameters:
facadeInterface -

getFacade

Object getFacade()
Returns:
Proxy facade for this flow or null if facade interface was not specified in the definition.

connect

void connect(int nodeIdx,
             String pinName,
             int transitionIdx,
             boolean isInbound,
             K connectKey)
             throws ConfigurationException
Connects contents of the flow (internal nodes).

Parameters:
nodeIdx - Node index. The flow itself has index -1.
pinName - Pin name.
transitionIdx - Transition index.
isInbound - True if transition is directed to the pin, false otherwise.
connectKey - Connect key.
Throws:
ConfigurationException

setBackEnd

void setBackEnd(Object object)
Sets back-end object (optional operation). If back-end object is set, flow connects its pins to the back-end object methods with matching names. This is a convenience method for embedding flows into Java programs.

Parameters:
object -