Interface PublisherCallbackChannel.Listener

  • All Known Implementing Classes:
    BatchingRabbitTemplate, RabbitTemplate, TestRabbitTemplate
    Enclosing interface:
    PublisherCallbackChannel

    public static interface PublisherCallbackChannel.Listener
    Listeners implementing this interface can participate in publisher confirms received from multiple channels, by invoking addListener on each channel. Standard AMQP channels do not support a listener being registered on multiple channels.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.String getUUID()
      Returns the UUID used to identify this Listener for returns.
      void handleConfirm​(PendingConfirm pendingConfirm, boolean ack)
      Invoked by the channel when a confirm is received.
      default void handleReturn​(int replyCode, java.lang.String replyText, java.lang.String exchange, java.lang.String routingKey, com.rabbitmq.client.AMQP.BasicProperties properties, byte[] body)
      Deprecated.
      default void handleReturn​(com.rabbitmq.client.Return returned)
      Handle a returned message.
      boolean isConfirmListener()  
      boolean isReturnListener()  
      void revoke​(com.rabbitmq.client.Channel channel)
      When called, this listener should remove all references to the channel - it will no longer be invoked by the channel.
    • Method Detail

      • handleConfirm

        void handleConfirm​(PendingConfirm pendingConfirm,
                           boolean ack)
        Invoked by the channel when a confirm is received.
        Parameters:
        pendingConfirm - The pending confirmation, containing correlation data.
        ack - true when 'ack', false when 'nack'.
      • handleReturn

        @Deprecated
        default void handleReturn​(int replyCode,
                                  java.lang.String replyText,
                                  java.lang.String exchange,
                                  java.lang.String routingKey,
                                  com.rabbitmq.client.AMQP.BasicProperties properties,
                                  byte[] body)
        Deprecated.
        Handle a returned message.
        Parameters:
        replyCode - the reply code.
        replyText - the reply text.
        exchange - the exchange.
        routingKey - the routing key.
        properties - the message properties.
        body - the message body.
      • handleReturn

        default void handleReturn​(com.rabbitmq.client.Return returned)
        Handle a returned message.
        Parameters:
        returned - the message and metadata.
      • revoke

        void revoke​(com.rabbitmq.client.Channel channel)
        When called, this listener should remove all references to the channel - it will no longer be invoked by the channel.
        Parameters:
        channel - The channel.
      • getUUID

        java.lang.String getUUID()
        Returns the UUID used to identify this Listener for returns.
        Returns:
        A string representation of the UUID.
      • isConfirmListener

        boolean isConfirmListener()
      • isReturnListener

        boolean isReturnListener()