Interface RabbitOperations.OperationsCallback<T>

  • Type Parameters:
    T - the type the callback returns.
    Enclosing interface:
    RabbitOperations
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface RabbitOperations.OperationsCallback<T>
    Callback for using the same channel for multiple RabbitTemplate operations.
    Since:
    2.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T doInRabbit​(RabbitOperations operations)
      Execute any number of operations using a dedicated Channel as long as those operations are performed on the template argument and on the calling thread.
    • Method Detail

      • doInRabbit

        @Nullable
        T doInRabbit​(RabbitOperations operations)
        Execute any number of operations using a dedicated Channel as long as those operations are performed on the template argument and on the calling thread. The channel will be physically closed when the callback exits.
        Parameters:
        operations - The operations.
        Returns:
        The result.