DataSource.NET
ChannelOpened Method (channel)
NamespacesCaplin.DataSource.ChannelIChannelListenerChannelOpened(IChannel)
Callback that informs the ChannelListener that a StreamLink client wishes to open a channel.
Declaration Syntax
C#Visual BasicVisual C++
bool ChannelOpened(
	IChannel channel
)
Function ChannelOpened ( _
	channel As IChannel _
) As Boolean
bool ChannelOpened(
	IChannel^ channel
)
Parameters
channel (IChannel)
The channel to be opened.
Return Value
A boolean denoting whether the IChannelListener accepts the channel.
Remarks

If you return true DataSource for Java will send an empty placeholder record back to the StreamLink client for the channel subject. The StreamLink client can then contribute fields to this record in order to send a message to the DataSource.

If you return false DataSource for Java will send a ISubjectErrorEvent back to the StreamLink client for the channel subject, with an error of NotFound. This indicates to the StreamLink client that the channel was rejected by the DataSource.

Your IChannelListener should decide whether to accept the channel based on the channel subject, which can be retrieved by calling Subject. This subject should contain all of the information needed for the DataSource to establish a channel. For example, if you are creating a trading application, the channel subject could contain the username of the StreamLink client and an asset class that the user wants to trade, for example:

/CHANNEL/FX/user1

If the channel subject is correctly formed, as in the example above, you should return true. If the subject does not contain all of the required information, or the information is invalid, you should return false.

Assembly: DataSource.NET (Module: DataSource.NET) Version: 6.2.6.2123 (6.2.6.2123)