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>,org.springframework.util.concurrent.ListenableFuture<T>
- Direct Known Subclasses:
AsyncRabbitTemplate.RabbitConverterFuture,AsyncRabbitTemplate.RabbitMessageFuture
- Enclosing class:
- AsyncRabbitTemplate
public abstract class AsyncRabbitTemplate.RabbitFuture<T> extends org.springframework.util.concurrent.SettableListenableFuture<T>Base class forListenableFutures returned byAsyncRabbitTemplate.- Since:
- 1.6
-
-
Constructor Summary
Constructors Constructor Description RabbitFuture(java.lang.String correlationId, org.springframework.amqp.core.Message requestMessage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel(boolean mayInterruptIfRunning)org.springframework.util.concurrent.ListenableFuture<java.lang.Boolean>getConfirm()When confirms are enabled contains aListenableFuturefor the confirmation.java.lang.StringgetNackCause()When confirms are enabled and a nack is received, contains the cause for the nack, if any.
-
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
getConfirm
public org.springframework.util.concurrent.ListenableFuture<java.lang.Boolean> getConfirm()
When confirms are enabled contains aListenableFuturefor 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.
-
-