com.ibm.websphere.messaging.mbean
Interface QueueMBean


@MXBean
public interface QueueMBean

The QueueMBean is enabled by the wasJmsServer feature. A QueueMBean is initialized for each Queue defined in the Messaging Engine configuration. Use the MBean programming interface to query runtime information about a Queue.

JMX clients should use the ObjectName of this MBean to query it
Partial Object Name: WebSphere:feature=wasJmsServer, type=Queue,name=*
where name is unique for each queue and is equal to the name of the queue defined in messaging engine configuration.


Method Summary
 void deleteAllQueuedMessages(java.lang.Boolean move)
          Delete all messages on the Queue.
 void deleteQueuedMessage(java.lang.String messageId, java.lang.Boolean move)
          Delete a specific message on the Queue.
 long getDepth()
          Getter for the depth attribute for the queue.
 java.lang.String getId()
          The ID of the Queue represented by this Messaging Engine.
 java.lang.String getIdentifier()
          The identifier (name) attribute of the Queue represented by this Messaging Engine.
 long getMaxQueueDepth()
          Getter for the MaxQueueDepth attribute for the queue.
 byte[] getMessageData(java.lang.String messageId, java.lang.Integer size)
          Get the data content, or payload, of one specific message on the Queue.
 com.ibm.ws.sib.admin.mxbean.QueuedMessage getQueuedMessage(java.lang.String messageId)
          Get an object representing one specific message on the Queue
 com.ibm.ws.sib.admin.mxbean.QueuedMessageDetail getQueuedMessageDetail(java.lang.String messageId)
          Get an object containing detailed information on one specific message on the Queue.
 com.ibm.ws.sib.admin.mxbean.QueuedMessage[] getQueuedMessages(java.lang.Integer fromIndex, java.lang.Integer toIndex, java.lang.Integer totalMessages)
          Get an array of objects representing the messages on the Queue starting from fromIndex to toIndex
 java.lang.String getState()
          Getter for the state attribute for the queue.
 boolean isSendAllowed()
          Checks if sendAllowed attribute is set for the Queue
 com.ibm.ws.sib.admin.mxbean.QueuedMessage[] listQueuedMessages()
          Lists an array of message objects representing the messages on the Queue.
 

Method Detail

getId

java.lang.String getId()
The ID of the Queue represented by this Messaging Engine.

Returns:
ID of the Queue

getIdentifier

java.lang.String getIdentifier()
The identifier (name) attribute of the Queue represented by this Messaging Engine. by this instance.

Returns:
Name of the Queue

getState

java.lang.String getState()
Getter for the state attribute for the queue.

Returns:
State of the Queue

getDepth

long getDepth()
Getter for the depth attribute for the queue.

Returns:
The number of messages queued to the Queue

getMaxQueueDepth

long getMaxQueueDepth()
Getter for the MaxQueueDepth attribute for the queue.

Returns:
The maximum number of messages permitted at the Queue

isSendAllowed

boolean isSendAllowed()
Checks if sendAllowed attribute is set for the Queue

Returns:
true if send is allowed on the Queue else false

listQueuedMessages

com.ibm.ws.sib.admin.mxbean.QueuedMessage[] listQueuedMessages()
                                                               throws java.lang.Exception
Lists an array of message objects representing the messages on the Queue.

Returns:
Array of messages queued in the Queue
Throws:
java.lang.Exception

getQueuedMessage

com.ibm.ws.sib.admin.mxbean.QueuedMessage getQueuedMessage(java.lang.String messageId)
                                                           throws java.lang.Exception
Get an object representing one specific message on the Queue

Parameters:
messageId - the ID of the message
Returns:
Message representing the message id
Throws:
java.lang.Exception

getQueuedMessageDetail

com.ibm.ws.sib.admin.mxbean.QueuedMessageDetail getQueuedMessageDetail(java.lang.String messageId)
                                                                       throws java.lang.Exception
Get an object containing detailed information on one specific message on the Queue. Exception messages are returned in the server locale.

Parameters:
messageId -
Returns:
Message representing the message id
Throws:
java.lang.Exception

getMessageData

byte[] getMessageData(java.lang.String messageId,
                      java.lang.Integer size)
                      throws java.lang.Exception
Get the data content, or payload, of one specific message on the Queue.

Parameters:
messageId - the ID of the message
size - the number of bytes to return. If the size is specified as zero, or the size exceeds the length of the data content, then the entire message content is returned.
Returns:
Byte Array representing the message data (Payload)
Throws:
java.lang.Exception

deleteQueuedMessage

void deleteQueuedMessage(java.lang.String messageId,
                         java.lang.Boolean move)
                         throws java.lang.Exception
Delete a specific message on the Queue.

Parameters:
messageId - the ID of the message
move - flag indicating whether the message should be discarded. If false, then the message is physically deleted. If true, the message is moved to the exception destination for this queue, if one exists.
Throws:
java.lang.Exception

deleteAllQueuedMessages

void deleteAllQueuedMessages(java.lang.Boolean move)
                             throws java.lang.Exception
Delete all messages on the Queue.

Parameters:
move - flag indicating whether the message should be moved to the exception destination or deleted. If true, the message is moved to the exception destination for this queue, if one exists. If false, then the message is physically deleted.
Throws:
java.lang.Exception

getQueuedMessages

com.ibm.ws.sib.admin.mxbean.QueuedMessage[] getQueuedMessages(java.lang.Integer fromIndex,
                                                              java.lang.Integer toIndex,
                                                              java.lang.Integer totalMessages)
                                                              throws java.lang.Exception
Get an array of objects representing the messages on the Queue starting from fromIndex to toIndex

Parameters:
fromIndex - Starting Index of the total messages retrieved
toIndex - Last Index of the total messages retrieved
totalMessages - Total number of messages to be retrieved in single invocation of this method
Returns:
Array of total number of messages retrieved
Throws:
java.lang.Exception