Package com.levigo.jadice.server
Class Node
- java.lang.Object
-
- com.levigo.jadice.server.internal.NodeInternal
-
- com.levigo.jadice.server.Node
-
- Direct Known Subclasses:
AbstractToXMLNode
,AbstractUnArchiveNode
,Csv2XlsxNode
,DemultiplexerNode
,DocumentPrintNode
,DummyNode
,DynamicPipelineNode
,EmbedAttachmentsNode
,ExternalProcessCallNode
,GhostscriptNode
,HTML2TextNode
,HTMLRendererNode
,ImageMagickConvertNode
,JadiceDocumentInfoNode
,JadiceServerInfoNode
,JavamailInputNode
,LibreOfficeConversionNode
,MailBodyCreatorNode
,MessageRFC822Node
,MSExcelNode
,MSOutlookNode
,MSPowerpointNode
,MSProjectNode
,MSVisioNode
,MSWordNode
,MultipartAlternativeNode
,MultipartAppleDoubleNode
,MultipartEncryptedNode
,MultipartMixedNode
,MultipartRelatedNode
,MultipartSignedNode
,MultiplexerNode
,NotificationNode
,NullNode
,OLEExtractorNode
,PageToImageNode
,PDFAnnotationRemoverNode
,PDFCompositeNode
,PDFDecryptNode
,PDFImageOptimizationNode
,PDFMergeNode
,PDFMetadataNode
,PDFRotationNode
,PDFSplitNode
,PortableCollectionDisassemblingNode
,PropertiesLogNode
,ReshapeNode
,RouterNode
,ScriptNode
,SeparatorPageNode
,StreamAnalysisNode
,StreamInputNode
,StreamOutputNode
,TIFFMergeNode
,TIFFSplitNode
,TNEFNode
,UnGZIPNode
,URLInputNode
,URLOutputNode
,Vcf2HtmlNode
,XRechnung2PdfNode
,XSLFOFormatterNode
,XSLTransformationNode
,ZIPNode
public abstract class Node extends com.levigo.jadice.server.internal.NodeInternal
Nodes represent vertices of the processing node graph. They represent functionality which has to be applied to the processed data, in order to achieve a desired goal. Node processing graphs (sometimes referred to as "pipelines") for a directed graph through which data passes, "visiting" the nodes for processing.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Node.Cardinality
Cardinality enum for input/output bundles.
-
Constructor Summary
Constructors Constructor Description Node()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addTransportReceiver(com.levigo.jadice.server.shared.transport.internal.TransportReceiver receiver)
Add aTransportReceiver
for this node.Node
appendSuccessor(Node successor)
Append one successor ("child" in tree lingo) to this node.void
apply(Limit limit)
Apply aLimit
to this Node.boolean
equals(Object obj)
Node.Cardinality
getInputCardinality()
Return the input cardinality of this node, i.e.Job
getJob()
Get the associated job, ornull
if the node is not yet initialized.Node.Cardinality
getOutputCardinality()
Return the output cardinality of this node, i.e.List<Node>
getPredecessors()
Get the predecessors ("parents" in tree lingo) to this node.Set<? extends Node>
getSubsidiaryNodes()
Node
s that were created on behalf of this node while executing the job on the server side can be retrieved with this method.List<Node>
getSuccessors()
Get the successors ("children" in tree lingo) of this node.protected com.levigo.jadice.server.shared.transport.internal.TransportSender
getTransportSender()
Return aTransportSender
for this node.String
getUUID()
Get the node's UUID.String
getWorkerClassName()
Return the node's associatedcom.levigo.jadice.server.core.NodeWorker
full qualified class's name.int
hashCode()
protected void
initialize(CommunicationSide side)
Node
prependPredecessor(Node predecessor)
Add a predecessor ("parent" in tree lingo) to this node.boolean
remove(Limit limit)
Remove a previously appliedLimit
.protected void
validateConfiguration()
-
-
-
Method Detail
-
getSuccessors
public List<Node> getSuccessors()
Get the successors ("children" in tree lingo) of this node.- Returns:
- this node's successors
-
getUUID
public String getUUID()
Get the node's UUID.- Returns:
- a UUID
-
getInputCardinality
public Node.Cardinality getInputCardinality()
Return the input cardinality of this node, i.e. how many bundles (not streams!) it expects to process. By default, nodes are "pipe-style", i.e. one input, one output.- Returns:
- input cardinality
-
getOutputCardinality
public Node.Cardinality getOutputCardinality()
Return the output cardinality of this node, i.e. how many bundles (not streams!) it expects to produce. By default, nodes are "pipe-style", i.e. one input, one output.- Returns:
- output cardinality
-
appendSuccessor
public Node appendSuccessor(Node successor)
Append one successor ("child" in tree lingo) to this node.- Parameters:
successor
- child node to be added- Returns:
- the added successor
-
getWorkerClassName
public String getWorkerClassName()
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.
- Returns:
- the full qualified class name of the worker of this node.
- Since:
- jadice server 4.2.0.0
-
prependPredecessor
public Node prependPredecessor(Node predecessor)
Add a predecessor ("parent" in tree lingo) to this node. Since in a tree scenario, a node has at most one parent, we use directed graph terminology here.- Parameters:
predecessor
- apredecessor node
- Returns:
- the added predecessor
-
getPredecessors
public List<Node> getPredecessors()
Get the predecessors ("parents" in tree lingo) to this node. Since in a tree scenario, a node has at most one parent, we use directed graph terminology here.- Returns:
- the added predecessor
-
getSubsidiaryNodes
public Set<? extends Node> getSubsidiaryNodes()
Node
s that were created on behalf of this node while executing the job on the server side can be retrieved with this method.- Returns:
- an unmodifiable view of the subsidiary nodes that were created while job execution
- Since:
- jadice server 4.3.1.0
-
getJob
public Job getJob()
Get the associated job, ornull
if the node is not yet initialized.- Returns:
- the associated job
-
initialize
protected void initialize(CommunicationSide side)
- Specified by:
initialize
in classcom.levigo.jadice.server.internal.NodeInternal
-
getTransportSender
protected final com.levigo.jadice.server.shared.transport.internal.TransportSender getTransportSender()
Return aTransportSender
for this node. The server sided worker can use this to communicate with the client sided node.- Returns:
- a TransportSender
-
addTransportReceiver
protected final void addTransportReceiver(com.levigo.jadice.server.shared.transport.internal.TransportReceiver receiver)
Add aTransportReceiver
for this node.- Parameters:
receiver
- theTransportReceiver
to register
-
validateConfiguration
protected void validateConfiguration() throws ConfigurationException
- Specified by:
validateConfiguration
in classcom.levigo.jadice.server.internal.NodeInternal
- Throws:
ConfigurationException
-
apply
public void apply(Limit limit)
Apply aLimit
to this Node.- Parameters:
limit
- The limit to apply
-
-