public class ConnectorSource extends Connector
Source
with any
Sink
it is matched with. The Connector provides information
concerning the Source it represents and the data the Source provides, the
ability to connect data-sinks to the Source and information about it's
connectivity.Modifier and Type | Class and Description |
---|---|
protected class |
ConnectorSource.AnnotatedReceiverQueues
Used to manage
ReceiverQueues , holding their
DataDescription and offering the ability to hold several
ReceiverQueues in one context to provide data for multiple Sink s. |
Modifier and Type | Field and Description |
---|---|
protected java.util.Vector<ConnectorSource.AnnotatedReceiverQueues> |
queues |
protected Source |
source |
Constructor and Description |
---|
ConnectorSource(Source source,
DataDispatcher dispatcher)
Creates a new
ConnectorSource representing given Source . |
Modifier and Type | Method and Description |
---|---|
protected void |
connectToInput(java.util.concurrent.LinkedBlockingQueue<DataEntry> newQueue,
DataDescription description)
Connects the represented
Source to a LinkedBlockingQueue
to write data to. |
DataDescription[] |
getOutputDescription() |
java.lang.String |
getSourceName()
Returns the
ConnectorSource 's represented Source's simple name. |
void |
writeOutput(DataEntry entry)
Passes data to every registered
Sink . |
isConnected
protected java.util.Vector<ConnectorSource.AnnotatedReceiverQueues> queues
protected Source source
public ConnectorSource(Source source, DataDispatcher dispatcher)
ConnectorSource
representing given Source
.
As soon as the connector is instantiated, it is registered at the
DataDispatcher
to be connected with other SystemComponent
s.source
- Source
to be represented.dispatcher
- DataDispatcher
used to dispatch the Connector
.public void writeOutput(DataEntry entry)
Sink
.entry
- DataEntry
to be passed to Sink
sdescription
- DataDescription
describing the data to be passed.public DataDescription[] getOutputDescription()
DataDescription
s of provided data.protected void connectToInput(java.util.concurrent.LinkedBlockingQueue<DataEntry> newQueue, DataDescription description)
Source
to a LinkedBlockingQueue
to write data to.queue
- LinkedBlockingQueue
the Source
is supposed to
be attached to.description
- DataDescription
describing the data to be wrote to the
queue.public java.lang.String getSourceName()
ConnectorSource
's represented Source's simple name.Source
's simple name.