org.apache.qpid.server.queue
Interface ManagedQueue


public interface ManagedQueue

The management interface exposed to allow management of a queue.

Version:
0.1
Author:
Robert J. Greig, Bhupendra Bhardwaj

Field Summary
static java.lang.String TYPE
           
 
Method Summary
 void clearQueue()
          Clears the queue by deleting all the undelivered messages from the queue.
 void deleteMessageFromTop()
          Deletes the first message from top.
 java.lang.Integer getActiveConsumerCount()
          Returns the total number of active subscribers to the queue.
 java.lang.Integer getConsumerCount()
          Returns the total number of subscribers to the queue.
 java.lang.Integer getMaximumMessageCount()
          Tells the maximum number of messages that can be stored in the queue.
 java.lang.Long getMaximumMessageSize()
          Returns the maximum size of a message (in kbytes) allowed to be accepted by the ManagedQueue.
 java.lang.Integer getMessageCount()
          Total number of messages on the queue, which are yet to be delivered to the consumer(s).
 java.lang.String getName()
          Returns the Name of the ManagedQueue.
 java.lang.String getOwner()
          Tells the Owner of the ManagedQueue.
 java.lang.Long getQueueDepth()
          Tells the maximum size of all the messages combined together, that can be stored in the queue.
 java.lang.Long getQueueSize()
          Size of messages in the queue
 java.lang.Long getReceivedMessageCount()
          Tells the total number of messages receieved by the queue since startup.
 boolean isAutoDelete()
          Tells if the ManagedQueue is set to AutoDelete.
 boolean isDurable()
          Tells whether this ManagedQueue is durable or not.
 void setMaximumMessageCount(java.lang.Integer value)
          Sets the maximum number of messages allowed to be stored in the queue.
 void setMaximumMessageSize(java.lang.Long size)
          Sets the maximum size of the message (in kbytes) that is allowed to be accepted by the Queue.
 void setQueueDepth(java.lang.Long value)
          Sets the maximum size of all the messages together, that can be stored in the queue.
 javax.management.openmbean.CompositeData viewMessageContent(long messageId)
           
 javax.management.openmbean.TabularData viewMessages(int fromIndex, int toIndex)
          Returns a subset of all the messages stored in the queue.
 

Field Detail

TYPE

static final java.lang.String TYPE
See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
                         throws java.io.IOException
Returns the Name of the ManagedQueue.

Returns:
the name of the managedQueue.
Throws:
java.io.IOException

isDurable

boolean isDurable()
                  throws java.io.IOException
Tells whether this ManagedQueue is durable or not.

Returns:
true if this ManagedQueue is a durable queue.
Throws:
java.io.IOException

getOwner

java.lang.String getOwner()
                          throws java.io.IOException
Tells the Owner of the ManagedQueue.

Returns:
the owner's name.
Throws:
java.io.IOException

isAutoDelete

boolean isAutoDelete()
                     throws java.io.IOException
Tells if the ManagedQueue is set to AutoDelete.

Returns:
true if the ManagedQueue is set to AutoDelete.
Throws:
java.io.IOException

getMessageCount

java.lang.Integer getMessageCount()
                                  throws java.io.IOException
Total number of messages on the queue, which are yet to be delivered to the consumer(s).

Returns:
number of undelivered message in the Queue.
Throws:
java.io.IOException

getMaximumMessageSize

java.lang.Long getMaximumMessageSize()
                                     throws java.io.IOException
Returns the maximum size of a message (in kbytes) allowed to be accepted by the ManagedQueue. This is useful in setting notifications or taking appropriate action, if the size of the message received is more than the allowed size.

Returns:
the maximum size of a message allowed to be aceepted by the ManagedQueue.
Throws:
java.io.IOException

setMaximumMessageSize

void setMaximumMessageSize(java.lang.Long size)
                           throws java.io.IOException
Sets the maximum size of the message (in kbytes) that is allowed to be accepted by the Queue.

Parameters:
size - maximum size of message.
Throws:
java.io.IOException

getConsumerCount

java.lang.Integer getConsumerCount()
                                   throws java.io.IOException
Returns the total number of subscribers to the queue.

Returns:
the number of subscribers.
Throws:
java.io.IOException

getActiveConsumerCount

java.lang.Integer getActiveConsumerCount()
                                         throws java.io.IOException
Returns the total number of active subscribers to the queue.

Returns:
the number of active subscribers
Throws:
java.io.IOException

getReceivedMessageCount

java.lang.Long getReceivedMessageCount()
                                       throws java.io.IOException
Tells the total number of messages receieved by the queue since startup.

Returns:
total number of messages received.
Throws:
java.io.IOException

getMaximumMessageCount

java.lang.Integer getMaximumMessageCount()
                                         throws java.io.IOException
Tells the maximum number of messages that can be stored in the queue. This is useful in setting the notifications or taking required action is the number of message increase this limit.

Returns:
maximum muber of message allowed to be stored in the queue.
Throws:
java.io.IOException

setMaximumMessageCount

void setMaximumMessageCount(java.lang.Integer value)
                            throws java.io.IOException
Sets the maximum number of messages allowed to be stored in the queue.

Parameters:
value - the maximum number of messages allowed to be stored in the queue.
Throws:
java.io.IOException

getQueueSize

java.lang.Long getQueueSize()
                            throws java.io.IOException
Size of messages in the queue

Returns:
Throws:
java.io.IOException

getQueueDepth

java.lang.Long getQueueDepth()
                             throws java.io.IOException
Tells the maximum size of all the messages combined together, that can be stored in the queue. This is useful for setting notifications or taking required action if the size of messages stored in the queue increases over this limit.

Returns:
maximum size of the all the messages allowed for the queue.
Throws:
java.io.IOException

setQueueDepth

void setQueueDepth(java.lang.Long value)
                   throws java.io.IOException
Sets the maximum size of all the messages together, that can be stored in the queue.

Parameters:
value -
Throws:
java.io.IOException

viewMessages

javax.management.openmbean.TabularData viewMessages(int fromIndex,
                                                    int toIndex)
                                                    throws java.io.IOException,
                                                           javax.management.JMException
Returns a subset of all the messages stored in the queue. The messages are returned based on the given index numbers.

Parameters:
fromIndex -
toIndex -
Returns:
Throws:
java.io.IOException
javax.management.JMException

deleteMessageFromTop

void deleteMessageFromTop()
                          throws java.io.IOException,
                                 javax.management.JMException
Deletes the first message from top.

Throws:
java.io.IOException
javax.management.JMException

clearQueue

void clearQueue()
                throws java.io.IOException,
                       javax.management.JMException
Clears the queue by deleting all the undelivered messages from the queue.

Throws:
java.io.IOException
javax.management.JMException

viewMessageContent

javax.management.openmbean.CompositeData viewMessageContent(long messageId)
                                                            throws java.io.IOException,
                                                                   javax.management.JMException
Throws:
java.io.IOException
javax.management.JMException