public class StreamOutputNode extends Node
A Node
for making the result Stream
s available on the client side. Clients have
two options for accessing the streams:
StreamBundle
via the method getStreamBundle()
and
iterate over its Stream
s. This is similar to how jadice server works internally.
StreamListener
s. Those listeners are notified upon
arrival of a new Stream
.
The underlying transport mechanism is made transparent due to this class.
As this node is a data sink it must not have a successor.
Node.Cardinality
Constructor and Description |
---|
StreamOutputNode() |
Modifier and Type | Method and Description |
---|---|
void |
addStreamResultListener(StreamListener listener)
Adds a listener to this node.
|
Node.Cardinality |
getOutputCardinality()
Return the output cardinality of this node, i.e.
|
StreamBundle |
getStreamBundle() |
String |
getWorkerClassName()
Return the node's associated
NodeWorker full qualified class's
name. |
protected void |
initialize(CommunicationSide side) |
void |
removeStreamResultListener(StreamListener listener)
Removes a listener from this node.
|
addTransportReceiver, appendSuccessor, apply, equals, getInputCardinality, getJob, getPredecessors, getSubsidiaryNodes, getSuccessors, getTransportSender, getUUID, hashCode, prependPredecessor, remove, validateConfiguration
public void addStreamResultListener(StreamListener listener)
listener
- This listener will be notified if a new Stream
is available or if no
more will follow.public String getWorkerClassName()
Node
Return the node's associated
NodeWorker
full qualified class's
name. By default, the worker class name is
This behavior can be overridden in concrete subclasses.
getWorkerClassName
in class Node
public void removeStreamResultListener(StreamListener listener)
listener
- This listener will no longer receive eventsaddStreamResultListener(StreamListener)
public StreamBundle getStreamBundle()
StreamBundle
that contains the Stream
s the server sends.protected void initialize(CommunicationSide side)
initialize
in class Node
public Node.Cardinality getOutputCardinality()
Node
getOutputCardinality
in class Node
Copyright © 2017 levigo holding gmbh. All rights reserved.