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 class
DynamicPipelineNode.UnhandledInputAction
A 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 String
ANY_TYPE
static URI
DEFAULT_RULESET
The 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 URI
getRuleset()
String
getTargetMimeType()
DynamicPipelineNode.UnhandledInputAction
getUnhandledInputAction()
String
getWorkerClassName()
Return the node's associatedcom.levigo.jadice.server.core.NodeWorker
full qualified class's name.void
setRuleset(URI location)
Set the location of the ruleset to be used.void
setTargetMimeType(String targetMimeType)
Set the desired target MIME type that streams shall have after the processing.
(Default:application/pdf
)void
setUnhandledInputAction(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:Node
Return the node's associatedcom.levigo.jadice.server.core.NodeWorker
full 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:
getWorkerClassName
in 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
Node
s. If aStream
does 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
- whataction
to 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
-
-