Class RabbitRpcClient.RabbitRpcClientConsumer

  • All Implemented Interfaces:
    com.rabbitmq.client.Consumer
    Enclosing class:
    RabbitRpcClient

    protected static class RabbitRpcClient.RabbitRpcClientConsumer
    extends com.rabbitmq.client.DefaultConsumer
    Internal implementation of a Consumer that receives messages on the reply queue and calls RabbitRpcClient.processResponseForRequest(String, byte[]) of its client.
    Author:
    Michael Röder (roeder@informatik.uni-leipzig.de)
    • Field Detail

      • client

        private RabbitRpcClient client
        The client for which this instance is acting as consumer.
    • Constructor Detail

      • RabbitRpcClientConsumer

        public RabbitRpcClientConsumer​(com.rabbitmq.client.Channel channel,
                                       RabbitRpcClient client)
        Constructor.
        Parameters:
        channel - channel from which the messages are received
        client - the client for which this instance is acting as consumer
    • Method Detail

      • handleDelivery

        public void handleDelivery​(String consumerTag,
                                   com.rabbitmq.client.Envelope envelope,
                                   com.rabbitmq.client.AMQP.BasicProperties properties,
                                   byte[] body)
                            throws IOException
        Specified by:
        handleDelivery in interface com.rabbitmq.client.Consumer
        Overrides:
        handleDelivery in class com.rabbitmq.client.DefaultConsumer
        Throws:
        IOException