Class ConnectionFactoryContextWrapper
java.lang.Object
org.springframework.amqp.rabbit.connection.ConnectionFactoryContextWrapper
Helper class to handle
ConnectionFactory
context binding and unbinding when executing instructions.- Since:
- 2.3
- Author:
- Wander Costa, Artem Bilan
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
Execute aCallable
binding the givenConnectionFactory
and finally unbinding it.<T> T
Execute aCallable
binding to the defaultConnectionFactory
and finally unbinding it.void
Execute aRunnable
binding to the defaultConnectionFactory
and finally unbinding it.void
Execute aRunnable
binding the givenConnectionFactory
and finally unbinding it.
-
Constructor Details
-
ConnectionFactoryContextWrapper
-
-
Method Details
-
call
Execute aCallable
binding to the defaultConnectionFactory
and finally unbinding it. -
call
Execute aCallable
binding the givenConnectionFactory
and finally unbinding it. -
run
Execute aRunnable
binding to the defaultConnectionFactory
and finally unbinding it.- Parameters:
runnable
- theRunnable
object to be executed.- Throws:
RuntimeException
- when a RuntimeException is thrown by theRunnable
.
-
run
Execute aRunnable
binding the givenConnectionFactory
and finally unbinding it.- Parameters:
contextName
- the name of the context. In null, empty or blank, default context is bound.runnable
- theRunnable
object to be executed.- Throws:
RuntimeException
- when a RuntimeException is thrown by theRunnable
.
-