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 for ListenableFutures returned by AsyncRabbitTemplate.
Since:
1.6
  • Constructor Details

    • RabbitFuture

      public RabbitFuture(String correlationId, Message requestMessage)
  • Method Details

    • cancel

      public boolean cancel(boolean mayInterruptIfRunning)
      Specified by:
      cancel in interface Future<T>
      Overrides:
      cancel in class SettableListenableFuture<T>
    • getConfirm

      public ListenableFuture<Boolean> getConfirm()
      When confirms are enabled contains a ListenableFuture 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.