com.hammurapi.flow.runtime.impl
Class DefaultSynapse<S,A>
java.lang.Object
com.hammurapi.flow.runtime.impl.DefaultSynapse<S,A>
- Type Parameters:
S - Flow state type.A - Argument type.
- All Implemented Interfaces:
- Invocable<S,A>
public class DefaultSynapse<S,A>
- extends Object
- implements Invocable<S,A>
Default synapse implementation.
- Author:
- Pavel Vlasov
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MAX_PATH
public static int DEFAULT_MAX_PATH
DEFAULT_MAX_REENTRANCE
public static int DEFAULT_MAX_REENTRANCE
DefaultSynapse
public DefaultSynapse(Invocable<S,A> invocable,
ProcessingPathElement processingPathElement)
- Constructors
- Parameters:
invocable - Target invocable.processingPathElement - Processing path element for given point in the flow.
getMaxPath
public int getMaxPath()
setMaxPath
public void setMaxPath(int maxPath)
getMaxReentrance
public int getMaxReentrance()
setMaxReentrance
public void setMaxReentrance(int maxReentrance)
invoke
public Collection<Future<?>> invoke(S flowState,
A[] args,
PropertySet properties,
Context context,
List<ProcessingPathElement> processingPath)
throws Exception
- Checks processing path length and this processing element reentrance count. Throws
exception if any of these numbers exceeds specified limit.
Then adds this processing path element to the processing path and invokes target
invocable in the current thread.
- Specified by:
invoke in interface Invocable<S,A>
- Throws:
Exception