Package org.springframework.amqp.rabbit
Class AsyncRabbitTemplate.RabbitFuture<T>
java.lang.Object
org.springframework.util.concurrent.SettableListenableFuture<T>
org.springframework.amqp.rabbit.AsyncRabbitTemplate.RabbitFuture<T>
- Type Parameters:
T
- the type.
- All Implemented Interfaces:
Future<T>
,ListenableFuture<T>
- Direct Known Subclasses:
AsyncRabbitTemplate.RabbitConverterFuture
,AsyncRabbitTemplate.RabbitMessageFuture
- Enclosing class:
- AsyncRabbitTemplate
Base class for
ListenableFuture
s returned by AsyncRabbitTemplate
.- Since:
- 1.6
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
cancel
(boolean mayInterruptIfRunning) When confirms are enabled contains aListenableFuture
for the confirmation.When confirms are enabled and a nack is received, contains the cause for the nack, if any.Methods inherited from class org.springframework.util.concurrent.SettableListenableFuture
addCallback, addCallback, completable, get, get, interruptTask, isCancelled, isDone, set, setException
-
Constructor Details
-
RabbitFuture
-
-
Method Details
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
getConfirm
When confirms are enabled contains aListenableFuture
for the confirmation.- Returns:
- the future.
-
getNackCause
When confirms are enabled and a nack is received, contains the cause for the nack, if any.- Returns:
- the cause.
-