Class RabbitQueue

java.lang.Object
org.hobbit.core.data.RabbitQueue
All Implemented Interfaces:
Closeable, AutoCloseable

public class RabbitQueue extends Object implements Closeable
Simple structure representing the data of a RabbitMQ queue, i.e., the Channel and the name.
Author:
Michael Röder (roeder@informatik.uni-leipzig.de)
  • Field Details

    • channel

      public final com.rabbitmq.client.Channel channel
      Channel of this queue.
    • name

      public final String name
      Name of this queue.
  • Constructor Details

    • RabbitQueue

      public RabbitQueue(com.rabbitmq.client.Channel channel, String name)
      Constructor.
      Parameters:
      channel - Channel of this queue.
      name - Name of this queue.
  • Method Details

    • getChannel

      public com.rabbitmq.client.Channel getChannel()
    • getName

      public String getName()
    • messageCount

      public long messageCount()
      Returns number of available messages or 0 if an error occurred.
      Returns:
      the number of available messages.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException