com.ibm.streams.flow.handlers
Class DynamicForwarder<T>
- java.lang.Object
-
- com.ibm.streams.flow.handlers.AbstractStreamForwarder<T>
-
- com.ibm.streams.flow.handlers.DynamicForwarder<T>
-
- Type Parameters:
T
- Type for the tuples on the stream
- All Implemented Interfaces:
- StreamHandler<T>
public class DynamicForwarder<T> extends AbstractStreamForwarder<T>
Forward a stream to anotherStreamHandler
. The destination for the forwarded stream can be changed by callingsetDestination(StreamHandler)
.- Since:
- InfoSphere® Streams Version 3.1
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
IBM_COPYRIGHT
-
Constructor Summary
Constructors Constructor and Description DynamicForwarder()
Create aDynamicForwarder
with the destination set to aStreamDiscarder
.DynamicForwarder(StreamHandler<T> handler)
Create aDynamicForwarder
with the destination set to ahandler
.
-
Method Summary
Methods Modifier and Type Method and Description StreamHandler<T>
getDestination()
Get the current destination for the stream.void
setDestination(StreamHandler<T> destination)
Set the destination for the stream.-
Methods inherited from class com.ibm.streams.flow.handlers.AbstractStreamForwarder
mark, tuple
-
-
-
-
Field Detail
-
IBM_COPYRIGHT
public static final java.lang.String IBM_COPYRIGHT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DynamicForwarder
public DynamicForwarder()
Create aDynamicForwarder
with the destination set to aStreamDiscarder
.
-
DynamicForwarder
public DynamicForwarder(StreamHandler<T> handler)
Create aDynamicForwarder
with the destination set to ahandler
.
-
-
Method Detail
-
setDestination
public void setDestination(StreamHandler<T> destination)
Set the destination for the stream.- Parameters:
destination
-
-
getDestination
public StreamHandler<T> getDestination()
Get the current destination for the stream.- Specified by:
getDestination
in classAbstractStreamForwarder<T>
- Returns:
- Handler that the stream is forwarded to.
-
-