Class RabbitRpcClient.RabbitRpcClientConsumer

java.lang.Object
com.rabbitmq.client.DefaultConsumer
org.hobbit.core.rabbit.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 Summary

    Fields
    Modifier and Type
    Field
    Description
    The client for which this instance is acting as consumer.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RabbitRpcClientConsumer(com.rabbitmq.client.Channel channel, RabbitRpcClient client)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handleDelivery(String consumerTag, com.rabbitmq.client.Envelope envelope, com.rabbitmq.client.AMQP.BasicProperties properties, byte[] body)
     

    Methods inherited from class com.rabbitmq.client.DefaultConsumer

    getChannel, getConsumerTag, handleCancel, handleCancelOk, handleConsumeOk, handleRecoverOk, handleShutdownSignal

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • client

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

    • 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 Details

    • 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