org.apache.qpid.management.common.mbeans
Interface ManagedQueue


public interface ManagedQueue

The management interface exposed to allow management of a queue.

Version:
0.1

Field Summary
static String ATTR_ACTIVE_CONSUMER_COUNT
           
static String ATTR_AUTODELETE
           
static String ATTR_CAPACITY
           
static String ATTR_CONSUMER_COUNT
           
static String ATTR_DURABLE
           
static String ATTR_EXCLUSIVE
           
static String ATTR_FLOW_OVERFULL
           
static String ATTR_FLOW_RESUME_CAPACITY
           
static String ATTR_MAX_MSG_AGE
           
static String ATTR_MAX_MSG_COUNT
           
static String ATTR_MAX_MSG_SIZE
           
static String ATTR_MAX_QUEUE_DEPTH
           
static String ATTR_MSG_COUNT
           
static String ATTR_NAME
           
static String ATTR_OWNER
           
static String ATTR_QUEUE_DEPTH
           
static String ATTR_RCVD_MSG_COUNT
           
static String CONTENT
           
static String ENCODING
           
static String MIME
           
static String MSG_AMQ_ID
           
static String MSG_HEADER
           
static String MSG_QUEUE_POS
           
static String MSG_REDELIVERED
           
static String MSG_SIZE
           
static List<String> QUEUE_ATTRIBUTES
           
static String TYPE
           
static List<String> VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC
           
static List<String> VIEW_MSGS_COMPOSITE_ITEM_NAMES_DESC
           
static List<String> VIEW_MSGS_TABULAR_UNIQUE_INDEX
           
 
Method Summary
 Long clearQueue()
          Clears the queue by deleting all the messages from the queue that have not been acquired by consumers" Since Qpid JMX API 1.3 this returns the number of messages deleted.
 void copyMessages(long fromMessageId, long toMessageId, String toQueue)
          Copies the messages in given range of AMQ message Ids to a given Queue.
 void deleteMessageFromTop()
          Deprecated. 
 void deleteMessages(long fromMessageId, long toMessageId)
          Deletes the messages in given range of AMQ message Ids in the given Queue.
 Integer getActiveConsumerCount()
          Returns the total number of active subscribers to the queue.
 Long getCapacity()
          Returns the current flow control Capacity of the queue in bytes.
 Integer getConsumerCount()
          Returns the total number of subscribers to the queue.
 Long getFlowResumeCapacity()
          Returns the current flow control FlowResumeCapacity of the queue in bytes.
 Long getMaximumMessageAge()
          Returns the maximum age of a message (expiration time) in milliseconds
 Long getMaximumMessageCount()
          Tells the maximum number of messages that can be stored in the queue.
 Long getMaximumMessageSize()
          Returns the maximum size of a message (in Bytes) allowed to be accepted by the ManagedQueue.
 Long getMaximumQueueDepth()
          This is useful for setting notifications or taking required action if the size of messages stored in the queue increases over this limit.
 Integer getMessageCount()
          Total number of messages on the queue, which are yet to be delivered to the consumer(s).
 String getName()
          Returns the Name of the ManagedQueue.
 String getOwner()
          Tells the Owner of the ManagedQueue.
 Long getQueueDepth()
          Size of messages in the queue Since Qpid JMX API 1.2 this operation returns in units of bytes.
 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.
 boolean isExclusive()
          Returns whether the queue is exclusive or not.
 boolean isFlowOverfull()
          Indicates whether the Queue is currently considered overfull by the FlowControl system
 void moveMessages(long fromMessageId, long toMessageId, String toQueue)
          Moves the messages in given range of message Ids to given Queue.
 void setCapacity(Long value)
          Sets the Capacity in bytes above which flow is blocked.
 void setExclusive(boolean exclusive)
          Sets whether the queue is exclusive or not.
 void setFlowResumeCapacity(Long value)
          Sets the FlowResumeCapacity in bytes below which flow resumes.
 void setMaximumMessageAge(Long age)
          Sets the maximum age of a message in milliseconds
 void setMaximumMessageCount(Long value)
          Sets the maximum number of messages allowed to be stored in the queue.
 void setMaximumMessageSize(Long size)
          Sets the maximum size of the message (in Bytes) that is allowed to be accepted by the Queue.
 void setMaximumQueueDepth(Long value)
          Sets the maximum size of all the messages together, that can be stored in the queue.
 CompositeData viewMessageContent(long messageId)
          Returns the content for the given AMQ Message ID.
 TabularData viewMessages(int fromIndex, int toIndex)
          Deprecated. 
 TabularData viewMessages(long startPosition, long endPosition)
          Returns a subset (up to 2^31 messages at a time) of all the messages stored on the queue.
 

Field Detail

TYPE

static final String TYPE
See Also:
Constant Field Values

MSG_AMQ_ID

static final String MSG_AMQ_ID
See Also:
Constant Field Values

MSG_HEADER

static final String MSG_HEADER
See Also:
Constant Field Values

MSG_SIZE

static final String MSG_SIZE
See Also:
Constant Field Values

MSG_REDELIVERED

static final String MSG_REDELIVERED
See Also:
Constant Field Values

MSG_QUEUE_POS

static final String MSG_QUEUE_POS
See Also:
Constant Field Values

VIEW_MSGS_COMPOSITE_ITEM_NAMES_DESC

static final List<String> VIEW_MSGS_COMPOSITE_ITEM_NAMES_DESC

VIEW_MSGS_TABULAR_UNIQUE_INDEX

static final List<String> VIEW_MSGS_TABULAR_UNIQUE_INDEX

MIME

static final String MIME
See Also:
Constant Field Values

ENCODING

static final String ENCODING
See Also:
Constant Field Values

CONTENT

static final String CONTENT
See Also:
Constant Field Values

VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC

static final List<String> VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC

ATTR_NAME

static final String ATTR_NAME
See Also:
Constant Field Values

ATTR_OWNER

static final String ATTR_OWNER
See Also:
Constant Field Values

ATTR_MAX_MSG_AGE

static final String ATTR_MAX_MSG_AGE
See Also:
Constant Field Values

ATTR_MAX_MSG_COUNT

static final String ATTR_MAX_MSG_COUNT
See Also:
Constant Field Values

ATTR_MAX_QUEUE_DEPTH

static final String ATTR_MAX_QUEUE_DEPTH
See Also:
Constant Field Values

ATTR_MAX_MSG_SIZE

static final String ATTR_MAX_MSG_SIZE
See Also:
Constant Field Values

ATTR_DURABLE

static final String ATTR_DURABLE
See Also:
Constant Field Values

ATTR_AUTODELETE

static final String ATTR_AUTODELETE
See Also:
Constant Field Values

ATTR_CONSUMER_COUNT

static final String ATTR_CONSUMER_COUNT
See Also:
Constant Field Values

ATTR_ACTIVE_CONSUMER_COUNT

static final String ATTR_ACTIVE_CONSUMER_COUNT
See Also:
Constant Field Values

ATTR_MSG_COUNT

static final String ATTR_MSG_COUNT
See Also:
Constant Field Values

ATTR_QUEUE_DEPTH

static final String ATTR_QUEUE_DEPTH
See Also:
Constant Field Values

ATTR_RCVD_MSG_COUNT

static final String ATTR_RCVD_MSG_COUNT
See Also:
Constant Field Values

ATTR_CAPACITY

static final String ATTR_CAPACITY
See Also:
Constant Field Values

ATTR_FLOW_OVERFULL

static final String ATTR_FLOW_OVERFULL
See Also:
Constant Field Values

ATTR_FLOW_RESUME_CAPACITY

static final String ATTR_FLOW_RESUME_CAPACITY
See Also:
Constant Field Values

ATTR_EXCLUSIVE

static final String ATTR_EXCLUSIVE
See Also:
Constant Field Values

QUEUE_ATTRIBUTES

static final List<String> QUEUE_ATTRIBUTES
Method Detail

getName

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

Returns:
the name of the managedQueue.
Throws:
IOException

getMessageCount

Integer getMessageCount()
                        throws 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:
IOException

getReceivedMessageCount

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

Returns:
total number of messages received.
Throws:
IOException

getQueueDepth

Long getQueueDepth()
                   throws IOException,
                          JMException
Size of messages in the queue Since Qpid JMX API 1.2 this operation returns in units of bytes. Prior to this, the result was in units of kilobytes.

Returns:
Throws:
IOException
JMException

getActiveConsumerCount

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

Returns:
the number of active subscribers
Throws:
IOException

getConsumerCount

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

Returns:
the number of subscribers.
Throws:
IOException

getOwner

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

Returns:
the owner's name.
Throws:
IOException

isDurable

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

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

isAutoDelete

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

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

getMaximumMessageAge

Long getMaximumMessageAge()
                          throws IOException
Returns the maximum age of a message (expiration time) in milliseconds

Returns:
the maximum age
Throws:
IOException

setMaximumMessageAge

void setMaximumMessageAge(Long age)
                          throws IOException
Sets the maximum age of a message in milliseconds

Parameters:
age - maximum age of message.
Throws:
IOException

getMaximumMessageSize

Long getMaximumMessageSize()
                           throws IOException
Returns the maximum size of a message (in Bytes) 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:
IOException

setMaximumMessageSize

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

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

getMaximumMessageCount

Long getMaximumMessageCount()
                            throws 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:
IOException

setMaximumMessageCount

void setMaximumMessageCount(Long value)
                            throws 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:
IOException

getMaximumQueueDepth

Long getMaximumQueueDepth()
                          throws IOException
This is useful for setting notifications or taking required action if the size of messages stored in the queue increases over this limit. Since Qpid JMX API 1.2 this operation returns in units of bytes. Prior to this, the result was in units of kilobytes.

Returns:
threshold high value for Queue Depth
Throws:
IOException

setMaximumQueueDepth

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

Parameters:
value -
Throws:
IOException

getCapacity

Long getCapacity()
                 throws IOException
Returns the current flow control Capacity of the queue in bytes.

Returns:
Capacity at which flow control is enforced
Throws:
IOException
Since:
Qpid JMX API 1.6

setCapacity

void setCapacity(Long value)
                 throws IOException,
                        IllegalArgumentException
Sets the Capacity in bytes above which flow is blocked.

Parameters:
value - the capacity in bytes
Throws:
IOException
IllegalArgumentException - If the given value is less than the queue FloeResumeCapacity
Since:
Qpid JMX API 1.6

getFlowResumeCapacity

Long getFlowResumeCapacity()
                           throws IOException
Returns the current flow control FlowResumeCapacity of the queue in bytes.

Returns:
Capacity below which flow resumes in bytes
Throws:
IOException
Since:
Qpid JMX API 1.6

setFlowResumeCapacity

void setFlowResumeCapacity(Long value)
                           throws IOException,
                                  IllegalArgumentException
Sets the FlowResumeCapacity in bytes below which flow resumes.

Parameters:
value - of the resume capacity in bytes
Throws:
IOException
IllegalArgumentException - If the given value exceeds the queue Capacity
Since:
Qpid JMX API 1.6

isFlowOverfull

boolean isFlowOverfull()
                       throws IOException
Indicates whether the Queue is currently considered overfull by the FlowControl system

Throws:
IOException
Since:
Qpid JMX API 1.6

isExclusive

boolean isExclusive()
                    throws IOException
Returns whether the queue is exclusive or not.

Returns:
whether the queue is exclusive.
Throws:
IOException
Since:
Qpid JMX API 2.0

setExclusive

void setExclusive(boolean exclusive)
                  throws IOException,
                         JMException
Sets whether the queue is exclusive or not.

Parameters:
exclusive - the capacity in bytes
Throws:
IOException
JMException
Since:
Qpid JMX API 2.0

viewMessages

@Deprecated
TabularData viewMessages(int fromIndex,
                                    int toIndex)
                         throws IOException,
                                JMException
Deprecated. 

Returns a subset of all the messages stored in the queue. The messages are returned based on the given index numbers. Deprecated as of Qpid JMX API 1.3

Parameters:
fromIndex -
toIndex -
Returns:
Throws:
IOException
JMException

viewMessages

TabularData viewMessages(long startPosition,
                         long endPosition)
                         throws IOException,
                                JMException
Returns a subset (up to 2^31 messages at a time) of all the messages stored on the queue. The messages are returned based on the given queue position range.

Parameters:
startPosition -
endPosition -
Returns:
Throws:
IOException
JMException

viewMessageContent

CompositeData viewMessageContent(long messageId)
                                 throws IOException,
                                        JMException
Returns the content for the given AMQ Message ID.

Throws:
IOException
JMException

deleteMessageFromTop

@Deprecated
void deleteMessageFromTop()
                          throws IOException,
                                 JMException
Deprecated. 

Deletes the first message from top. Deprecated as of Qpid JMX API 1.3

Throws:
IOException
JMException

clearQueue

Long clearQueue()
                throws IOException,
                       JMException
Clears the queue by deleting all the messages from the queue that have not been acquired by consumers" Since Qpid JMX API 1.3 this returns the number of messages deleted. Prior to this, the return type was void.

Returns:
the number of messages deleted
Throws:
IOException
JMException

moveMessages

void moveMessages(long fromMessageId,
                  long toMessageId,
                  String toQueue)
                  throws IOException,
                         JMException
Moves the messages in given range of message Ids to given Queue. QPID-170

Parameters:
fromMessageId - first in the range of message ids
toMessageId - last in the range of message ids
toQueue - where the messages are to be moved
Throws:
IOException
JMException

deleteMessages

void deleteMessages(long fromMessageId,
                    long toMessageId)
                    throws IOException,
                           JMException
Deletes the messages in given range of AMQ message Ids in the given Queue.

Parameters:
fromMessageId - first in the range of message ids
toMessageId - last in the range of message ids
Throws:
IOException
JMException

copyMessages

void copyMessages(long fromMessageId,
                  long toMessageId,
                  String toQueue)
                  throws IOException,
                         JMException
Copies the messages in given range of AMQ message Ids to a given Queue.

Parameters:
fromMessageId - first in the range of message ids
toMessageId - last in the range of message ids
toQueue - where the messages are to be copied
Throws:
IOException
JMException


Licensed to the Apache Software Foundation