public class ConsumerChannelRegistry
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
ConsumerChannelRegistry.ChannelHolder |
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.ThreadLocal<ConsumerChannelRegistry.ChannelHolder> |
consumerChannel |
private static org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
ConsumerChannelRegistry() |
| Modifier and Type | Method and Description |
|---|---|
static com.rabbitmq.client.Channel |
getConsumerChannel()
See registerConsumerChannel.
|
static com.rabbitmq.client.Channel |
getConsumerChannel(ConnectionFactory connectionFactory)
See registerConsumerChannel.
|
static void |
registerConsumerChannel(com.rabbitmq.client.Channel channel,
ConnectionFactory connectionFactory)
If a listener container is configured to use a RabbitTransactionManager, the
consumer's channel is registered here so that it is used as the bound resource
when the transaction actually starts.
|
static void |
unRegisterConsumerChannel()
See registerConsumerChannel.
|
private static final org.apache.commons.logging.Log logger
private static final java.lang.ThreadLocal<ConsumerChannelRegistry.ChannelHolder> consumerChannel
public static void registerConsumerChannel(com.rabbitmq.client.Channel channel,
ConnectionFactory connectionFactory)
channel - The channel to register.connectionFactory - The connection factory.public static void unRegisterConsumerChannel()
public static com.rabbitmq.client.Channel getConsumerChannel()
public static com.rabbitmq.client.Channel getConsumerChannel(ConnectionFactory connectionFactory)
connectionFactory - The connection factory.