DataPipe, DataPipeForked, IDataSinkpublic 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 IDataSinkpublic IDataSink[] getDataSinks()
getDataSinks in interface DataPipeForkedpublic void setDataSinks(IDataSink[] dataSinks)
DataPipeForkedsetDataSinks in interface DataPipeForkeddataSinks - The data sinks to set.public void setDataSink(IDataSink dataSink)
Implementation of DataPipe interface.
setDataSink in interface DataPipedataSink - the new, sole DataSink connected to this DataForkpublic void addDataSink(IDataSink newDataSink)
DataPipeForkedaddDataSink in interface DataPipeForkedpublic void removeDataSink(IDataSink dataSink)
DataPipeForkedremoveDataSink in interface DataPipeForkeddataSink - data sink to be removed from this list, if present.