Package org.hobbit.core.data
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., theChanneland the name.- Author:
- Michael Röder (roeder@informatik.uni-leipzig.de)
-
-
Constructor Summary
Constructors Constructor Description RabbitQueue(com.rabbitmq.client.Channel channel, String name)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()com.rabbitmq.client.ChannelgetChannel()StringgetName()longmessageCount()Returns number of available messages or 0 if an error occurred.StringtoString()
-
-
-
Field Detail
-
channel
public final com.rabbitmq.client.Channel channel
Channel of this queue.
-
name
public final String name
Name of this queue.
-
-
Constructor Detail
-
RabbitQueue
public RabbitQueue(com.rabbitmq.client.Channel channel, String name)Constructor.- Parameters:
channel- Channel of this queue.name- Name of this queue.
-
-
Method Detail
-
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.
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-