|
Spring AMQP | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.transaction.support.ResourceHolderSupport
org.springframework.amqp.rabbit.connection.RabbitResourceHolder
public class RabbitResourceHolder
Rabbit resource holder, wrapping a RabbitMQ Connection and Channel. RabbitTransactionManager binds instances of this class to the thread, for a given Rabbit ConnectionFactory.
Note: This is an SPI class, not intended to be used by applications.
(not yet implemented),
RabbitTemplate| Constructor Summary | |
|---|---|
RabbitResourceHolder()
Create a new RabbitResourceHolder that is open for resources to be added. |
|
RabbitResourceHolder(com.rabbitmq.client.Channel channel)
Create a new RabbitResourceHolder for the given Rabbit Channel. |
|
RabbitResourceHolder(com.rabbitmq.client.Connection connection,
com.rabbitmq.client.Channel channel)
Create a new RabbitResourceHolder for the given Rabbit resources. |
|
RabbitResourceHolder(ConnectionFactory connectionFactory)
Create a new RabbitResourceHolder that is open for resources to be added. |
|
RabbitResourceHolder(ConnectionFactory connectionFactory,
com.rabbitmq.client.Connection connection,
com.rabbitmq.client.Channel channel)
Create a new RabbitResourceHolder for the given Rabbit resources. |
|
| Method Summary | |
|---|---|
void |
addChannel(com.rabbitmq.client.Channel channel)
|
void |
addChannel(com.rabbitmq.client.Channel channel,
com.rabbitmq.client.Connection connection)
|
void |
addConnection(com.rabbitmq.client.Connection connection)
|
void |
closeAll()
|
void |
commitAll()
|
boolean |
containsChannel(com.rabbitmq.client.Channel channel)
|
com.rabbitmq.client.Channel |
getChannel()
|
com.rabbitmq.client.Channel |
getChannel(Class<? extends com.rabbitmq.client.Channel> channelType)
|
com.rabbitmq.client.Channel |
getChannel(Class<? extends com.rabbitmq.client.Channel> channelType,
com.rabbitmq.client.Connection connection)
|
com.rabbitmq.client.Connection |
getConnection()
|
com.rabbitmq.client.Connection |
getConnection(Class<? extends com.rabbitmq.client.Connection> connectionType)
|
boolean |
isFrozen()
|
| Methods inherited from class org.springframework.transaction.support.ResourceHolderSupport |
|---|
clear, getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, hasTimeout, isOpen, isRollbackOnly, isSynchronizedWithTransaction, isVoid, released, requested, reset, setRollbackOnly, setSynchronizedWithTransaction, setTimeoutInMillis, setTimeoutInSeconds, unbound |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RabbitResourceHolder()
addConnection(com.rabbitmq.client.Connection),
addChannel(com.rabbitmq.client.Channel)public RabbitResourceHolder(ConnectionFactory connectionFactory)
connectionFactory - the Rabbit ConnectionFactory that this
resource holder is associated with (may be null)public RabbitResourceHolder(com.rabbitmq.client.Channel channel)
channel - the Rabbit Channel
public RabbitResourceHolder(com.rabbitmq.client.Connection connection,
com.rabbitmq.client.Channel channel)
connection - the Rabbit Connectionchannel - the Rabbit Channel
public RabbitResourceHolder(ConnectionFactory connectionFactory,
com.rabbitmq.client.Connection connection,
com.rabbitmq.client.Channel channel)
connectionFactory - the Rabbit ConnectionFactory that this
resource holder is associated with (may be null)connection - the Rabbit Connectionchannel - the Rabbit Channel| Method Detail |
|---|
public final boolean isFrozen()
public final void addConnection(com.rabbitmq.client.Connection connection)
public final void addChannel(com.rabbitmq.client.Channel channel)
public final void addChannel(com.rabbitmq.client.Channel channel,
com.rabbitmq.client.Connection connection)
public boolean containsChannel(com.rabbitmq.client.Channel channel)
public com.rabbitmq.client.Connection getConnection()
public com.rabbitmq.client.Connection getConnection(Class<? extends com.rabbitmq.client.Connection> connectionType)
public com.rabbitmq.client.Channel getChannel()
public com.rabbitmq.client.Channel getChannel(Class<? extends com.rabbitmq.client.Channel> channelType)
public com.rabbitmq.client.Channel getChannel(Class<? extends com.rabbitmq.client.Channel> channelType,
com.rabbitmq.client.Connection connection)
public void commitAll()
throws IOException
IOExceptionpublic void closeAll()
|
Spring AMQP | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||