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:
java.util.concurrent.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(java.lang.String correlationId, Message requestMessage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
ListenableFuture<java.lang.Boolean>
getConfirm()
When confirms are enabled contains aListenableFuture
for the confirmation.java.lang.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
-
-
-
-
Constructor Detail
-
RabbitFuture
public RabbitFuture(java.lang.String correlationId, Message requestMessage)
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancel
in interfacejava.util.concurrent.Future<T>
- Overrides:
cancel
in classSettableListenableFuture<T>
-
getConfirm
public ListenableFuture<java.lang.Boolean> getConfirm()
When confirms are enabled contains aListenableFuture
for the confirmation.- Returns:
- the future.
-
getNackCause
public java.lang.String getNackCause()
When confirms are enabled and a nack is received, contains the cause for the nack, if any.- Returns:
- the cause.
-
-