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
public abstract class AsyncRabbitTemplate.RabbitFuture<T> extends SettableListenableFuture<T>
Base class forListenableFuture
s returned byAsyncRabbitTemplate
.- Since:
- 1.6
-
-
Constructor Summary
Constructors Constructor Description RabbitFuture(String correlationId, Message requestMessage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
ListenableFuture<Boolean>
getConfirm()
When confirms are enabled contains aListenableFuture
for the confirmation.String
getNackCause()
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
-
-
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
getConfirm
public ListenableFuture<Boolean> getConfirm()
When confirms are enabled contains aListenableFuture
for the confirmation.- Returns:
- the future.
-
getNackCause
public String getNackCause()
When confirms are enabled and a nack is received, contains the cause for the nack, if any.- Returns:
- the cause.
-
-