|
Spring AMQP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.amqp.rabbit.connection.RabbitUtils
public abstract class RabbitUtils
| Field Summary | |
|---|---|
static int |
DEFAULT_PORT
|
| Constructor Summary | |
|---|---|
RabbitUtils()
|
|
| Method Summary | |
|---|---|
static void |
closeChannel(com.rabbitmq.client.Channel channel)
Close the given RabbitMQ Channel and ignore any thrown exception. |
static void |
closeConnection(Connection connection)
Close the given RabbitMQ Connection and ignore any thrown exception. |
static void |
closeMessageConsumer(com.rabbitmq.client.Channel channel,
String consumerTag,
boolean transactional)
|
static void |
commitIfNecessary(com.rabbitmq.client.Channel channel)
Commit the Channel if not within a JTA transaction. |
static void |
declareTransactional(com.rabbitmq.client.Channel channel)
Declare to that broker that a channel is going to be used transactionally, and convert exceptions that arise. |
static boolean |
isPhysicalCloseRequired()
Gets and removes a ThreadLocal indicating the channel MUST be physically closed. |
static void |
rollbackIfNecessary(com.rabbitmq.client.Channel channel)
|
static void |
setPhysicalCloseRequired(boolean b)
Sets a ThreadLocal indicating the channel MUST be physically closed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_PORT
| Constructor Detail |
|---|
public RabbitUtils()
| Method Detail |
|---|
public static void closeConnection(Connection connection)
finally blocks in manual RabbitMQ code.
connection - the RabbitMQ Connection to close (may be null)public static void closeChannel(com.rabbitmq.client.Channel channel)
finally
blocks in manual RabbitMQ code.
channel - the RabbitMQ Channel to close (may be null)public static void commitIfNecessary(com.rabbitmq.client.Channel channel)
channel - the RabbitMQ Channel to commitpublic static void rollbackIfNecessary(com.rabbitmq.client.Channel channel)
public static void closeMessageConsumer(com.rabbitmq.client.Channel channel,
String consumerTag,
boolean transactional)
public static void declareTransactional(com.rabbitmq.client.Channel channel)
channel - the channel to usepublic static void setPhysicalCloseRequired(boolean b)
b - public static boolean isPhysicalCloseRequired()
|
Spring AMQP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||