com.ibm.websphere.messaging.mbean

Interface QueueMBean


  1. @MXBean
  2. 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

Modifier and Type Method and Description
  1. void
deleteAllQueuedMessages(java.lang.Boolean move)
Delete all messages on the Queue.
  1. void
deleteQueuedMessage(java.lang.String messageId,java.lang.Boolean move)
Delete a specific message on the Queue.
  1. long
getDepth()
Getter for the depth attribute for the queue.
  1. java.lang.String
getId()
The ID of the Queue represented by this Messaging Engine.
  1. java.lang.String
getIdentifier()
The identifier (name) attribute of the Queue represented by this Messaging Engine.
  1. long
getMaxQueueDepth()
Getter for the MaxQueueDepth attribute for the queue.
  1. byte[]
getMessageData(java.lang.String messageId,java.lang.Integer size)
Get the data content, or payload, of one specific message on the Queue.
  1. com.ibm.ws.sib.admin.mxbean.QueuedMessage
getQueuedMessage(java.lang.String messageId)
Get an object representing one specific message on the Queue
  1. 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.
  1. 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
  1. java.lang.String
getState()
Getter for the state attribute for the queue.
  1. boolean
isSendAllowed()
Checks if sendAllowed attribute is set for the Queue
  1. com.ibm.ws.sib.admin.mxbean.QueuedMessage[]
listQueuedMessages()
Lists an array of message objects representing the messages on the Queue.

Method Detail

getId

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

getIdentifier

  1. 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

  1. java.lang.String getState()
Getter for the state attribute for the queue.
Returns:
State of the Queue

getDepth

  1. long getDepth()
Getter for the depth attribute for the queue.
Returns:
The number of messages queued to the Queue

getMaxQueueDepth

  1. long getMaxQueueDepth()
Getter for the MaxQueueDepth attribute for the queue.
Returns:
The maximum number of messages permitted at the Queue

isSendAllowed

  1. boolean isSendAllowed()
Checks if sendAllowed attribute is set for the Queue
Returns:
true if send is allowed on the Queue else false

listQueuedMessages

  1. com.ibm.ws.sib.admin.mxbean.QueuedMessage[] listQueuedMessages( )
  2. 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

  1. com.ibm.ws.sib.admin.mxbean.QueuedMessage getQueuedMessage( java.lang.String messageId)
  2. 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

  1. com.ibm.ws.sib.admin.mxbean.QueuedMessageDetail getQueuedMessageDetail( java.lang.String messageId)
  2. 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

  1. byte[] getMessageData(java.lang.String messageId,
  2. java.lang.Integer size)
  3. 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

  1. void deleteQueuedMessage(java.lang.String messageId,
  2. java.lang.Boolean move)
  3. 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

  1. void deleteAllQueuedMessages(java.lang.Boolean move)
  2. 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

  1. com.ibm.ws.sib.admin.mxbean.QueuedMessage[] getQueuedMessages( java.lang.Integer fromIndex,
  2. java.lang.Integer toIndex,
  3. java.lang.Integer totalMessages)
  4. 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