Class MultipartAlternativeNode
- java.lang.Object
-
- com.levigo.jadice.server.internal.NodeInternal
-
- com.levigo.jadice.server.Node
-
- com.levigo.jadice.server.javamail.MultipartAlternativeNode
-
public class MultipartAlternativeNode extends Node
ThisNode
unpacks multipart/alternative MIME parts. This node forwards all parts in the preferred order defined bysetTypePreference(String[])
.If
isForwardAllMatches()
evaluates to false, at most one part is forwarded.The execution fails if
- No part matches any type preference.
- The container doesn't have a part.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.levigo.jadice.server.Node
Node.Cardinality
-
-
Constructor Summary
Constructors Constructor Description MultipartAlternativeNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getTypePreference()
String
getWorkerClassName()
Return the node's associatedcom.levigo.jadice.server.core.NodeWorker
full qualified class's name.boolean
isForwardAllMatches()
void
setForwardAllMatches(boolean forwardAllMatches)
Set flag if at most one or all matching parts are forwardedvoid
setTypePreference(String[] typePreference)
Set the type preference order.-
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
public static final String ANY
Constant that indicates that any type is forwarded.- See Also:
setTypePreference(String[])
, Constant Field Values
-
-
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.
-
getTypePreference
public String[] getTypePreference()
- Returns:
- the type preference order.
-
setTypePreference
public void setTypePreference(String[] typePreference)
Set the type preference order. (default: "text/html", "text/plain",ANY
)- Parameters:
typePreference
- an array of MIME types
-
setForwardAllMatches
public void setForwardAllMatches(boolean forwardAllMatches)
Set flag if at most one or all matching parts are forwarded- Parameters:
forwardAllMatches
- if false at most one stream is forwarded- Since:
- jadice server 4.1.1.3
-
isForwardAllMatches
public boolean isForwardAllMatches()
- Returns:
- true if all parts that match one the patterns shall be forwarded. false if at most one part shall be forwarded.
- Since:
- jadice server 4.1.1.3
-
-