com.googlecode.sarasvati
Interface CustomNodeWrapper

All Superinterfaces:
Adaptable, Node
All Known Implementing Classes:
HibCustomNodeWrapper, MemCustomNodeWrapper

public interface CustomNodeWrapper
extends Node

This interface represents a Node which will provide an adapter for instances of CustomNode, bridging the gap between a backend specific Node implementation, such as HibNode or MemNode, and the backend agnostic CustomNode.

Author:
Paul Lorenz

Method Summary
 GuardResult defaultGuard(Engine engine, NodeToken token)
          Evaluates the guard using the default strategy for the given Node/Engine combination.
 CustomNode getCustomNode(Engine engine)
          Returns the CustomNode being wrapped.
<T> T
getDefaultAdaptor(Class<T> clazz)
          Returns the default adapter for the current Engine.
 
Methods inherited from interface com.googlecode.sarasvati.Node
backtrack, execute, getExternal, getExternalEnv, getGraph, getGuard, getId, getJoinParam, getJoinStrategy, getJoinType, getName, getOriginatingExternalNode, getType, guard, isBacktrackable, isImportedFromExternal, isStart
 
Methods inherited from interface com.googlecode.sarasvati.adapter.Adaptable
getAdaptor
 

Method Detail

getCustomNode

CustomNode getCustomNode(Engine engine)
Returns the CustomNode being wrapped.

Parameters:
engine - The current engine, which may be required to load the CustomNode
Returns:
The CustomNode being wrapped.

getDefaultAdaptor

<T> T getDefaultAdaptor(Class<T> clazz)
Returns the default adapter for the current Engine.

Type Parameters:
T - The adapter
Parameters:
clazz - The adapter type being requested.
Returns:
An adapter of the type being requested or null, if none is available.

defaultGuard

GuardResult defaultGuard(Engine engine,
                         NodeToken token)
Evaluates the guard using the default strategy for the given Node/Engine combination.

Parameters:
engine - The engine executing the current process
token - The token which triggered the guard evaluation.
Returns:
A GuardResult based on the guard defined for the Node.