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
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TExecute aCallablebinding the givenConnectionFactoryand finally unbinding it.<T> TExecute aCallablebinding to the defaultConnectionFactoryand finally unbinding it.voidExecute aRunnablebinding to the defaultConnectionFactoryand finally unbinding it.voidExecute aRunnablebinding the givenConnectionFactoryand finally unbinding it.
-
Constructor Details
-
ConnectionFactoryContextWrapper
-
-
Method Details
-
call
Execute aCallablebinding to the defaultConnectionFactoryand finally unbinding it. -
call
Execute aCallablebinding the givenConnectionFactoryand finally unbinding it. -
run
Execute aRunnablebinding to the defaultConnectionFactoryand finally unbinding it.- Parameters:
runnable- theRunnableobject to be executed.- Throws:
RuntimeException- when a RuntimeException is thrown by theRunnable.
-
run
Execute aRunnablebinding the givenConnectionFactoryand finally unbinding it.- Parameters:
contextName- the name of the context. In null, empty or blank, default context is bound.runnable- theRunnableobject to be executed.- Throws:
RuntimeException- when a RuntimeException is thrown by theRunnable.
-