Class SystemResourceUsageRequester

    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • responseQueueName

        private String responseQueueName
        Name of the queue that is used to receive responses for messages that are sent via the command queue and for which an answer is expected.
      • responseConsumer

        private com.rabbitmq.client.QueueingConsumer responseConsumer
        Consumer of the queue that is used to receive responses for messages that are sent via the command queue and for which an answer is expected.
      • cmdChannel

        protected com.rabbitmq.client.Channel cmdChannel
        Channel that is used for the command queue but not owned by this class (i.e., it won't be closed).
      • incomingChannel

        protected com.rabbitmq.client.Channel incomingChannel
      • sessionIdBytes

        protected byte[] sessionIdBytes
      • gson

        protected com.google.gson.Gson gson
    • Constructor Detail

      • SystemResourceUsageRequester

        protected SystemResourceUsageRequester​(com.rabbitmq.client.Channel cmdChannel,
                                               com.rabbitmq.client.Channel incomingChannel,
                                               String responseQueueName,
                                               com.rabbitmq.client.QueueingConsumer responseConsumer,
                                               String sessionId)
    • Method Detail

      • sendToCmdQueue

        protected void sendToCmdQueue​(byte command,
                                      byte[] data,
                                      com.rabbitmq.client.AMQP.BasicProperties props)
                               throws IOException
        Sends the given command to the command queue with the given data appended and using the given properties.
        Parameters:
        command - the command that should be sent
        data - data that should be appended to the command
        props - properties that should be used for the message
        Throws:
        IOException - if a communication problem occurs