DataPipe
, DataPipeForked
, IDataSink
public class DataFork extends java.lang.Object implements DataPipeForked
Modifier and Type | Field | Description |
---|---|---|
protected IDataInfo |
dataInfo |
|
protected IDataSink[] |
dataSinkList |
|
protected DataTag |
tag |
Constructor | Description |
---|---|
DataFork() |
Constructs with no initial DataSinks.
|
DataFork(IDataSink[] dataSinks) |
Constructs to forward data to the given sinks.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addDataSink(IDataSink newDataSink) |
Adds the given DataSink to those receiving the Data entering this DataFork,
keeping all previously entered DataSinks.
|
IDataSink[] |
getDataSinks() |
|
DataTag |
getTag() |
|
void |
putData(IData data) |
Puts the given Data through into all DataSinks.
|
void |
putDataInfo(IDataInfo incomingDataInfo) |
Puts the given DataInfo through into all DataSinks, inserting
a data caster before any sinks needing one.
|
void |
removeDataSink(IDataSink dataSink) |
Removes the specified data sink.
|
void |
setDataSink(IDataSink dataSink) |
Sets the given DataSink as the only one connected to this DataFork.
|
void |
setDataSinks(IDataSink[] dataSinks) |
Sets the list of DataSinks that receive the Data entering this DataFork.
|
protected final DataTag tag
protected IDataSink[] dataSinkList
protected IDataInfo dataInfo
public DataFork()
public DataFork(IDataSink[] dataSinks)
public void putData(IData data)
public void putDataInfo(IDataInfo incomingDataInfo)
putDataInfo
in interface IDataSink
public IDataSink[] getDataSinks()
getDataSinks
in interface DataPipeForked
public void setDataSinks(IDataSink[] dataSinks)
DataPipeForked
setDataSinks
in interface DataPipeForked
dataSinks
- The data sinks to set.public void setDataSink(IDataSink dataSink)
Implementation of DataPipe interface.
setDataSink
in interface DataPipe
dataSink
- the new, sole DataSink connected to this DataForkpublic void addDataSink(IDataSink newDataSink)
DataPipeForked
addDataSink
in interface DataPipeForked
public void removeDataSink(IDataSink dataSink)
DataPipeForked
removeDataSink
in interface DataPipeForked
dataSink
- data sink to be removed from this list, if present.