com.ibm.websphere.messaging.mbean
Interface TopicMBean


@MXBean
public interface TopicMBean

The TopicMBean is enabled by the wasJmsServer feature. A TopicMBean is initialized for each Topic existing on the messaging engine. Use the MBean programming interface to query runtime information about a Topic.

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


Method Summary
 void deleteSubscription(java.lang.String subId)
          Delete a subscription
 void deleteSubscriptionMessage(java.lang.String subId, java.lang.String messageId, java.lang.Boolean move)
          Delete a specific message on the Subscription.
 long getDepth()
          Total number of unique messages on this Topic which are not yet passed to all subscribers
 java.lang.String getId()
          The UUID of the Topic represented by this instance.
 java.lang.String getIdentifier()
          The identifier (name) attribute of the Topic represented by this instance.
 long getMaxQueueSize()
          The maximum number of messages permitted at the Topic
 com.ibm.ws.sib.admin.mxbean.MessagingSubscription getSubscription(java.lang.String subId)
          Get an object representing a specified Subscription
 com.ibm.ws.sib.admin.mxbean.MessagingSubscription getSubscriptionByName(java.lang.String subName)
          Get an object representing a specified Subscription
 com.ibm.ws.sib.admin.mxbean.QueuedMessage getSubscriptionMessage(java.lang.String subId, java.lang.String messageId)
          Get a message object representing one specific message on a specified Subscription.
 byte[] getSubscriptionMessageData(java.lang.String subId, java.lang.String messageId, java.lang.Integer size)
          Get the data content, or payload, of one specific message on the Subscription.
 com.ibm.ws.sib.admin.mxbean.QueuedMessageDetail getSubscriptionMessageDetail(java.lang.String subId, java.lang.String messageId)
          Get a message object containing detailed information on one specific message on a specified Subscription.
 com.ibm.ws.sib.admin.mxbean.QueuedMessage[] getSubscriptionMessages(java.lang.String subId)
          Get an array of message objects representing the messages on a specified Subscription.
 boolean isSendAllowed()
          Can producers send to this Topic?
 com.ibm.ws.sib.admin.mxbean.MessagingSubscription[] listSubscriptions()
          List an array of objects representing all Subscriptions at this Topic
 

Method Detail

getId

java.lang.String getId()
The UUID of the Topic represented by this instance.

Returns:
ID of the Topic

getIdentifier

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

Returns:
Name of the Topic

getMaxQueueSize

long getMaxQueueSize()
The maximum number of messages permitted at the Topic

Returns:
Maximum number of messages permitted for the Topic

isSendAllowed

boolean isSendAllowed()
Can producers send to this Topic?

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

getDepth

long getDepth()
Total number of unique messages on this Topic which are not yet passed to all subscribers

Returns:
Number of messages present on the Topic

listSubscriptions

com.ibm.ws.sib.admin.mxbean.MessagingSubscription[] listSubscriptions()
                                                                      throws java.lang.Exception
List an array of objects representing all Subscriptions at this Topic

Returns:
Array of Subscriptions for the Topic
Throws:
java.lang.Exception

getSubscription

com.ibm.ws.sib.admin.mxbean.MessagingSubscription getSubscription(java.lang.String subId)
                                                                  throws java.lang.Exception
Get an object representing a specified Subscription

Parameters:
subId - the ID of the subscription
Returns:
Subscription represented by the Subscription ID
Throws:
java.lang.Exception

getSubscriptionByName

com.ibm.ws.sib.admin.mxbean.MessagingSubscription getSubscriptionByName(java.lang.String subName)
                                                                        throws java.lang.Exception
Get an object representing a specified Subscription

Parameters:
subName - the name of the subscription( name is represented as clientId##subscription name)
Returns:
Subscription represented by the Subscription name
Throws:
java.lang.Exception

deleteSubscription

void deleteSubscription(java.lang.String subId)
                        throws java.lang.Exception
Delete a subscription

Parameters:
subId -
Throws:
com.ibm.ws.sib.admin.exception.InvalidArgumentException
com.ibm.ws.sib.admin.exception.ControllableNotFoundException
com.ibm.ws.sib.admin.exception.RuntimeOperationFailedException
java.lang.Exception

getSubscriptionMessages

com.ibm.ws.sib.admin.mxbean.QueuedMessage[] getSubscriptionMessages(java.lang.String subId)
                                                                    throws java.lang.Exception
Get an array of message objects representing the messages on a specified Subscription.

Returns:
Array of messages ready to be subscribed by the Subscription representing Subscription ID
Throws:
java.lang.Exception

getSubscriptionMessage

com.ibm.ws.sib.admin.mxbean.QueuedMessage getSubscriptionMessage(java.lang.String subId,
                                                                 java.lang.String messageId)
                                                                 throws java.lang.Exception
Get a message object representing one specific message on a specified Subscription.

Parameters:
subId - the ID of the subscription
messageId - the ID of the message
Returns:
Message representing the Message ID and ready to be consumed by Subscription representing Subscription ID
Throws:
java.lang.Exception

getSubscriptionMessageDetail

com.ibm.ws.sib.admin.mxbean.QueuedMessageDetail getSubscriptionMessageDetail(java.lang.String subId,
                                                                             java.lang.String messageId)
                                                                             throws java.lang.Exception
Get a message object containing detailed information on one specific message on a specified Subscription.

Parameters:
subId - the ID of the subscription
messageId - the ID of the message
Returns:
Message representing the Message ID and ready to be consumed by Subscription representing Subscription ID
Throws:
java.lang.Exception

getSubscriptionMessageData

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

Parameters:
subId - the ID of the subscription
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 Payload
Throws:
java.lang.Exception

deleteSubscriptionMessage

void deleteSubscriptionMessage(java.lang.String subId,
                               java.lang.String messageId,
                               java.lang.Boolean move)
                               throws java.lang.Exception
Delete a specific message on the Subscription.

Parameters:
subId - the ID of the subscription
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