Package com.levigo.jadice.server.nodes
Class DynamicPipelineNode
- java.lang.Object
-
- com.levigo.jadice.server.internal.NodeInternal
-
- com.levigo.jadice.server.Node
-
- com.levigo.jadice.server.nodes.DynamicPipelineNode
-
public class DynamicPipelineNode extends Node
The DynamicPipelineNode tries to build a dynamic workflow pipeline with the goal of converting whatever stream is presented to it into a common output format.This node can be configured with an XML ruleset that defines which node shall be called depending on the input's MIME type.
For a more flexible way of deciding what to do, use the
ScriptNode.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDynamicPipelineNode.UnhandledInputActionA choice of possible actions to take upon encountering an input stream of an unknown/unhandled type.-
Nested classes/interfaces inherited from class com.levigo.jadice.server.Node
Node.Cardinality
-
-
Field Summary
Fields Modifier and Type Field Description static StringANY_TYPEstatic URIDEFAULT_RULESETThe location of the default ruleset to use
-
Constructor Summary
Constructors Constructor Description DynamicPipelineNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URIgetRuleset()StringgetTargetMimeType()DynamicPipelineNode.UnhandledInputActiongetUnhandledInputAction()StringgetWorkerClassName()Return the node's associatedcom.levigo.jadice.server.core.NodeWorkerfull qualified class's name.voidsetRuleset(URI location)Set the location of the ruleset to be used.voidsetTargetMimeType(String targetMimeType)Set the desired target MIME type that streams shall have after the processing.
(Default:application/pdf)voidsetUnhandledInputAction(DynamicPipelineNode.UnhandledInputAction unhandledInputAction)Set the action to take when an input type is not covered by the ruleset.-
Methods inherited from class com.levigo.jadice.server.Node
addTransportReceiver, appendSuccessor, apply, equals, getInputCardinality, getJob, getOutputCardinality, getPredecessors, getSubsidiaryNodes, getSuccessors, getTransportSender, getUUID, hashCode, initialize, prependPredecessor, remove, validateConfiguration
-
-
-
-
Field Detail
-
ANY_TYPE
public static final String ANY_TYPE
- See Also:
- Constant Field Values
-
DEFAULT_RULESET
public static final URI DEFAULT_RULESET
The location of the default ruleset to use
-
-
Method Detail
-
getWorkerClassName
public String getWorkerClassName()
Description copied from class:NodeReturn the node's associatedcom.levigo.jadice.server.core.NodeWorkerfull qualified class's name. By default, the worker class name is- The same as the node name with the trailing "Node" replaced by "Worker" if the node name ends in "Node"
- The node class name with an appended "Worker" otherwise.
This behavior can be overridden in concrete subclasses.
- Overrides:
getWorkerClassNamein classNode- Returns:
- the full qualified class name of the worker of this node.
-
getTargetMimeType
public String getTargetMimeType()
- Returns:
- the target mime type
-
setTargetMimeType
public void setTargetMimeType(String targetMimeType)
Set the desired target MIME type that streams shall have after the processing.
(Default:application/pdf)This field is used for a sanity check before processed streams are forwarded to subsequent
Nodes. If aStreamdoes not have this MIME type (seeStreamDescriptor.getMimeType()) a warning will occur.This sanity check can be switched off by setting this field to
ANY_TYPE.- Parameters:
targetMimeType- The MIME type the results of the processing shall have- See Also:
StreamDescriptor.getMimeType()
-
getUnhandledInputAction
public DynamicPipelineNode.UnhandledInputAction getUnhandledInputAction()
- Returns:
- the action to take when an input type is not covered by the ruleset.
- See Also:
DynamicPipelineNode.UnhandledInputAction
-
setUnhandledInputAction
public void setUnhandledInputAction(DynamicPipelineNode.UnhandledInputAction unhandledInputAction)
Set the action to take when an input type is not covered by the ruleset.- Parameters:
unhandledInputAction- whatactionto perform if an input type can not be handled.
-
getRuleset
public URI getRuleset()
- Returns:
- the location of the ruleset to be used.
-
setRuleset
public void setRuleset(URI location)
Set the location of the ruleset to be used.- Parameters:
location- location of the ruleset to be used
-
-