Class Bridge
- java.lang.Object
- 
- org.smooks.engine.delivery.sax.ng.bridge.Bridge
 
- 
 public class Bridge extends Object Represents a bridge node and provides convenience methods to retrieve attribute values from the node.
 A bridge node holds the state of an execution. Formally, a bridge is a pair of attributes:source: key to an execution context value holding the event visit: name of the visit method that the event is targeting Bridge nodes are meant for nested Smooks executions (i.e., a Smooks execution within another Smooks execution). It allows the outer execution to carry over its visit state to the nested execution with the help of BridgeInterceptor. Without a bridge, the nested Smooks instance cannot join the inner execution to the outer one.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TypedKey<Node>getSourceKey()Gets the execution context key which maps to the node representing the event.NodegetSourceValue(ExecutionContext executionContext)Provides a convenience method to retrieve the source node.StringgetVisit()Gets the name of the visit thisBridgeis targeting.static booleanisBridge(Node node)Checks whether a node is a bridge element.
 
- 
- 
- 
Constructor Detail- 
Bridgepublic Bridge(Node node) 
 
- 
 - 
Method Detail- 
isBridgepublic static boolean isBridge(Node node) Checks whether a node is a bridge element.- Parameters:
- node- the node to be tested
- Returns:
- trueif the node is a bridge otherwise- false
 
 - 
getSourceKeypublic TypedKey<Node> getSourceKey() Gets the execution context key which maps to the node representing the event.- Returns:
- the key of the execution context entry that holds the event node
 
 - 
getVisitpublic String getVisit() Gets the name of the visit thisBridgeis targeting.- Returns:
- the name of the visit
 
 - 
getSourceValuepublic Node getSourceValue(ExecutionContext executionContext) Provides a convenience method to retrieve the source node.- Parameters:
- executionContext- the execution context holding the source
- Returns:
- the source node or nullif not found
 
 
- 
 
-