public class QueueMBean extends AMQManagedObject implements ManagedQueue, QueueNotificationListener
| Modifier and Type | Class and Description |
|---|---|
protected static class |
QueueMBean.GetMessageVisitor |
| Modifier and Type | Field and Description |
|---|---|
static String |
JMSTIMESTAMP_DATETIME_FORMAT
Date/time format used for message expiration and message timestamp formatting
|
ATTR_ACTIVE_CONSUMER_COUNT, ATTR_ALT_EXCHANGE, ATTR_AUTODELETE, ATTR_CAPACITY, ATTR_CONSUMER_COUNT, ATTR_DESCRIPTION, ATTR_DURABLE, ATTR_EXCLUSIVE, ATTR_FLOW_OVERFULL, ATTR_FLOW_RESUME_CAPACITY, ATTR_MAX_MSG_AGE, ATTR_MAX_MSG_COUNT, ATTR_MAX_MSG_SIZE, ATTR_MAX_QUEUE_DEPTH, ATTR_MAXIMUM_DELIVERY_COUNT, ATTR_MESSAGE_GROUP_KEY, ATTR_MSG_COUNT, ATTR_NAME, ATTR_OLDEST_MESSAGE_AGE, ATTR_OWNER, ATTR_QUEUE_DEPTH, ATTR_QUEUE_TYPE, ATTR_RCVD_MSG_COUNT, ATTR_SHARED_MESSAGE_GROUP, CONTENT, ENCODING, MIME, MSG_AMQ_ID, MSG_DELIVERY_COUNT, MSG_HEADER, MSG_QUEUE_POS, MSG_REDELIVERED, MSG_SIZE, QUEUE_ATTRIBUTES, TYPE, VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC, VIEW_MSGS_COMPOSITE_ITEM_NAMES_DESC, VIEW_MSGS_TABULAR_UNIQUE_INDEXDOMAIN| Constructor and Description |
|---|
QueueMBean(Queue queue,
VirtualHostMBean virtualHostMBean) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
String |
getAlternateExchange()
Returns the name of the Alternate Exchange for the queue, or null if there isn't one.
|
Long |
getCapacity()
Returns the current flow control Capacity of the queue in bytes.
|
Integer |
getConsumerCount()
Returns the total number of subscribers to the queue.
|
String |
getDescription()
Gets the free text queue description.
|
Long |
getFlowResumeCapacity()
Returns the current flow control FlowResumeCapacity of the queue in bytes.
|
Integer |
getMaximumDeliveryCount()
Maximum number of times a message is permitted to be delivered or zero if not enforced.
|
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 |
getMessageGroupKey()
Gets the message group key
|
String |
getName()
Returns the Name of the ManagedQueue.
|
MBeanNotificationInfo[] |
getNotificationInfo()
returns Notifications sent by this MBean.
|
String |
getObjectInstanceName() |
Long |
getOldestMessageAge()
Gets the arrival time of the oldest message in the queue
|
String |
getOwner()
Tells the Owner of the ManagedQueue.
|
ManagedObject |
getParentObject() |
Long |
getQueueDepth()
Size of messages in the queue
Since Qpid JMX API 1.2 this operation returns in units of bytes.
|
String |
getQueueType()
Gets the queue type
|
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
|
boolean |
isMessageGroupSharedGroups()
Gets the message group key
|
void |
moveMessages(long fromMessageId,
long toMessageId,
String toQueue)
Moves the messages in given range of message Ids to given Queue.
|
void |
notifyClients(NotificationCheck notification,
Queue queue,
String notificationMsg) |
void |
setAlternateExchange(String exchangeName)
Sets the Alternate Exchange for the queue, for use in dead letter queue functionality.
|
void |
setCapacity(Long value)
Sets the Capacity in bytes above which flow is blocked.
|
void |
setDescription(String description)
Sets the free text queue description.
|
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.
|
addNotificationListener, getBroadcaster, incrementAndGetSequenceNumber, removeNotificationListenergetHierarchicalName, getHierarchicalType, getManagementInterface, getMBeanInfo, getObjectName, getObjectNameForSingleInstanceMBean, getRegistry, getType, register, toString, unregistercacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInterface, getParameterName, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementationpublic static final String JMSTIMESTAMP_DATETIME_FORMAT
public QueueMBean(Queue queue, VirtualHostMBean virtualHostMBean) throws JMException
JMExceptionpublic ManagedObject getParentObject()
getParentObject in interface ManagedObjectgetParentObject in class DefaultManagedObjectpublic String getObjectInstanceName()
getObjectInstanceName in interface ManagedObjectpublic String getName()
ManagedQueuegetName in interface ManagedQueuepublic Integer getMessageCount()
ManagedQueuegetMessageCount in interface ManagedQueuepublic Integer getMaximumDeliveryCount()
ManagedQueuegetMaximumDeliveryCount in interface ManagedQueuepublic Long getReceivedMessageCount()
ManagedQueuegetReceivedMessageCount in interface ManagedQueuepublic Long getQueueDepth()
ManagedQueuegetQueueDepth in interface ManagedQueuepublic Integer getActiveConsumerCount()
ManagedQueuegetActiveConsumerCount in interface ManagedQueuepublic Integer getConsumerCount()
ManagedQueuegetConsumerCount in interface ManagedQueuepublic String getOwner()
ManagedQueuegetOwner in interface ManagedQueuepublic String getQueueType()
ManagedQueuegetQueueType in interface ManagedQueuepublic boolean isDurable()
ManagedQueueisDurable in interface ManagedQueuepublic boolean isAutoDelete()
ManagedQueueisAutoDelete in interface ManagedQueuepublic Long getMaximumMessageAge()
ManagedQueuegetMaximumMessageAge in interface ManagedQueuepublic void setMaximumMessageAge(Long age)
ManagedQueuesetMaximumMessageAge in interface ManagedQueueage - maximum age of message.public Long getMaximumMessageSize()
ManagedQueuegetMaximumMessageSize in interface ManagedQueuepublic void setMaximumMessageSize(Long size)
ManagedQueuesetMaximumMessageSize in interface ManagedQueuesize - maximum size of message.public Long getMaximumMessageCount()
ManagedQueuegetMaximumMessageCount in interface ManagedQueuepublic void setMaximumMessageCount(Long value)
ManagedQueuesetMaximumMessageCount in interface ManagedQueuevalue - the maximum number of messages allowed to be stored in the queue.public Long getMaximumQueueDepth()
ManagedQueuegetMaximumQueueDepth in interface ManagedQueuepublic void setMaximumQueueDepth(Long value)
ManagedQueuesetMaximumQueueDepth in interface ManagedQueuepublic Long getCapacity()
ManagedQueuegetCapacity in interface ManagedQueuepublic void setCapacity(Long value)
ManagedQueuesetCapacity in interface ManagedQueuevalue - the capacity in bytespublic Long getFlowResumeCapacity()
ManagedQueuegetFlowResumeCapacity in interface ManagedQueuepublic void setFlowResumeCapacity(Long value)
ManagedQueuesetFlowResumeCapacity in interface ManagedQueuevalue - of the resume capacity in bytespublic boolean isFlowOverfull()
ManagedQueueisFlowOverfull in interface ManagedQueuepublic boolean isExclusive()
ManagedQueueisExclusive in interface ManagedQueuepublic void setExclusive(boolean exclusive)
ManagedQueuesetExclusive in interface ManagedQueueexclusive - the capacity in bytespublic void setAlternateExchange(String exchangeName) throws OperationsException
ManagedQueuesetAlternateExchange in interface ManagedQueueexchangeName - the name of the exchange to use. Specifying null or the empty string will clear the
alternate exchange.OperationsExceptionpublic String getAlternateExchange()
ManagedQueuegetAlternateExchange in interface ManagedQueue@Deprecated public TabularData viewMessages(int fromIndex, int toIndex) throws IOException, JMException
ManagedQueueviewMessages in interface ManagedQueueIOExceptionJMExceptionpublic TabularData viewMessages(long startPosition, long endPosition) throws IOException, JMException
ManagedQueueviewMessages in interface ManagedQueueIOExceptionJMExceptionpublic CompositeData viewMessageContent(long messageId) throws IOException, JMException
ManagedQueueviewMessageContent in interface ManagedQueueIOExceptionJMException@Deprecated public void deleteMessageFromTop() throws IOException, JMException
ManagedQueuedeleteMessageFromTop in interface ManagedQueueIOExceptionJMExceptionpublic Long clearQueue() throws IOException, JMException
ManagedQueueclearQueue in interface ManagedQueueIOExceptionJMExceptionpublic void moveMessages(long fromMessageId,
long toMessageId,
String toQueue)
throws IOException,
JMException
ManagedQueuemoveMessages in interface ManagedQueuefromMessageId - first in the range of message idstoMessageId - last in the range of message idstoQueue - where the messages are to be movedIOExceptionJMExceptionpublic void deleteMessages(long fromMessageId,
long toMessageId)
throws IOException,
JMException
ManagedQueuedeleteMessages in interface ManagedQueuefromMessageId - first in the range of message idstoMessageId - last in the range of message idsIOExceptionJMExceptionpublic void copyMessages(long fromMessageId,
long toMessageId,
String toQueue)
throws IOException,
JMException
ManagedQueuecopyMessages in interface ManagedQueuefromMessageId - first in the range of message idstoMessageId - last in the range of message idstoQueue - where the messages are to be copiedIOExceptionJMExceptionpublic void notifyClients(NotificationCheck notification, Queue queue, String notificationMsg)
notifyClients in interface QueueNotificationListenerpublic MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo in interface NotificationBroadcastergetNotificationInfo in class DefaultManagedObjectpublic String getDescription()
ManagedQueuegetDescription in interface ManagedQueuepublic void setDescription(String description)
ManagedQueuesetDescription in interface ManagedQueuepublic String getMessageGroupKey()
ManagedQueuegetMessageGroupKey in interface ManagedQueuepublic boolean isMessageGroupSharedGroups()
ManagedQueueisMessageGroupSharedGroups in interface ManagedQueuepublic Long getOldestMessageAge()
ManagedQueuegetOldestMessageAge in interface ManagedQueueCopyright © 2006–2016 The Apache Software Foundation. All rights reserved.