- channel (IChannel)
- The channel to be opened.
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.