Class RabbitMqChannelImpl
java.lang.Object
com.sportradar.unifiedodds.sdk.internal.impl.rabbitconnection.RabbitMqChannelImpl
- All Implemented Interfaces:
OnDemandChannelSupervisor
An implementation of the
OnDemandChannelSupervisor-
Constructor Summary
ConstructorsConstructorDescriptionRabbitMqChannelImpl(RabbitMqSystemListener rabbitMqSystemListener, WhoAmIReader whoAmIReader, String sdkVersion, AmqpConnectionFactory connectionFactory, TimeUtils timeUtils, Sleep sleep) Initializes a new instance of theRabbitMqChannelImpl -
Method Summary
Modifier and TypeMethodDescriptioncom.sportradar.unifiedodds.sdk.internal.impl.rabbitconnection.ChannelStatusChecks channel status on demandvoidclose()Terminates the current channelvoidopen(List<String> routingKeys, ChannelMessageConsumer channelMessageConsumer, String messageInterest) Opens the current channel and binds the created queue to the provided routing keys
-
Constructor Details
-
RabbitMqChannelImpl
@Inject public RabbitMqChannelImpl(RabbitMqSystemListener rabbitMqSystemListener, WhoAmIReader whoAmIReader, String sdkVersion, AmqpConnectionFactory connectionFactory, TimeUtils timeUtils, Sleep sleep) Initializes a new instance of theRabbitMqChannelImpl- Parameters:
rabbitMqSystemListener- aRabbitMqSystemListenerinstance used to dispatch system eventswhoAmIReader- aWhoAmIReaderused to access current SDK instance context informationsdkVersion- version of the sdkconnectionFactory- Connection factory for getting actual connectiontimeUtils- a time utility class
-
-
Method Details
-
open
public void open(List<String> routingKeys, ChannelMessageConsumer channelMessageConsumer, String messageInterest) throws IOException Opens the current channel and binds the created queue to the provided routing keys- Specified by:
openin interfaceOnDemandChannelSupervisor- Parameters:
routingKeys- - aListof routing keys which should be bindedchannelMessageConsumer- - aChannelMessageConsumerwhich consumes the received payloadsmessageInterest- message interest this channel is linked to- Throws:
IOException- if the routing keys bind failed
-
close
Terminates the current channel- Specified by:
closein interfaceOnDemandChannelSupervisor- Throws:
IOException- if the channel closure failed
-
checkStatus
public com.sportradar.unifiedodds.sdk.internal.impl.rabbitconnection.ChannelStatus checkStatus()Description copied from interface:OnDemandChannelSupervisorChecks channel status on demand- Specified by:
checkStatusin interfaceOnDemandChannelSupervisor
-