public interface Channel
Channel
s provide a bi-directional communication mechanism between StreamLink clients
and DataSource applications. Messages on a channel take the form of
RecordMessage
s that can be sent by either the
DataSource or the StreamLink client. An example use of Channel
would be to implement
a trade messaging channel.
A channel is identified by its subject and the DataSource Peer
(for
example, a Liberator) that opened the channel. In deployment, this means that it is possible for
two channels to exist with identical subjects but they are differentiated by the
Peer
s that opened them.
Modifier and Type | Method and Description |
---|---|
GenericMessage |
createMessage(java.lang.String subject)
Creates a Generic Message.
|
RecordType1Message |
createRecordMessage(java.lang.String subject)
Creates a type 1 record message.
|
Peer |
getPeer()
Gets the peer that opened the channel.
|
java.lang.String |
getSubject()
Gets the subject of this channel.
|
void |
sendMessage(RecordMessage message)
Sends a record message to the peer that opened the channel.
|
void |
sendRecordMessage(RecordMessage message)
Deprecated.
use sendMessage instead
|
void |
sendSubjectError(java.lang.String subject,
SubjectError error)
Sends a subject error event to the peer that opened the channel.
|
java.lang.String getSubject()
Peer getPeer()
GenericMessage createMessage(java.lang.String subject)
subject
- The subject of the GenericMessage
.GenericMessage
.void sendMessage(RecordMessage message)
message
- The RecordMessage
to be sent.RecordType1Message createRecordMessage(java.lang.String subject)
subject
- The subject of the RecordType1Message
.RecordType1Message
.@Deprecated void sendRecordMessage(RecordMessage message)
message
- The RecordMessage
to be sent.void sendSubjectError(java.lang.String subject, SubjectError error)
subject
- The subject to send the subject error to.error
- The SubjectError
to be sent.Please send bug reports and comments to Caplin support