com.neeve.toa.spi
Interface ChannelJoinProvider


public interface ChannelJoinProvider

A ChannelJoinProvider can be used to specify the whether or not a channel should be joined.

Normally a TopicOrientedApplication will automatically join a channel if it finds an EventHandler for a message type that is mapped to the channel in a service definition. An application may provide a ChannelJoinProvider to override this behavior.

See Also:
TopicOrientedApplication messaging configuration

Method Summary
 TopicOrientedApplication.ChannelJoin getChannelJoin(ToaService service, ToaServiceChannel channel)
          Indicates whether or not a channel should be joined.
 

Method Detail

getChannelJoin

TopicOrientedApplication.ChannelJoin getChannelJoin(ToaService service,
                                                    ToaServiceChannel channel)
Indicates whether or not a channel should be joined.

Return Values

A ChannelJoinProvider may return a TopicOrientedApplication.ChannelJoin value to indicate whether or not a channel should be joined:

Otherwise, if there isn't a handler for the message and no ChannelJoinProvider returns a value, but the channel is preconfigured for the application via DDL configuration then the preconfigured value for join will be used. In summary, the precendence for determining channel join is as follows:

ChannelJoinProvider Conflicts

It is illegal for one ChannelJoinProvider returns Join and another to return NoJoin. The application will fail to start in such a case.

Parameters:
service - The service that defined the channel.
channel - The channel.
Returns:
A value indicating whether or not the channel should be joined.
See Also:
TopicOrientedApplication messaging configuration


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.