Package com.tibco.tibjms.admin
Class ConsumerInfo
- java.lang.Object
- 
- com.tibco.tibjms.admin.ConsumerInfo
 
- 
 public class ConsumerInfo extends java.lang.ObjectRepresents message consumer in EMS server.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classConsumerInfo.DetailsProvides additional information about consumer.
 - 
Constructor SummaryConstructors Constructor Description ConsumerInfo(java.lang.Object json)For Internal use only, may be removed or deprecated in future.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ConsumerInfofrom(javax.management.openmbean.CompositeData cd)For Internal use only, may be removed or deprecated in future.longgetConnectionID()Return the consumer's connection ID or 0.longgetCreateTime()Returns consumer's creation time in milliseconds.java.lang.StringgetDestinationName()Returns consumer's destination name.intgetDestinationType()Returns consumer's destination type.DetailedDestStat[]getDetailedStatistics()Returns detailed statistics for a wildcarded consumer.ConsumerInfo.DetailsgetDetails()Returns additional details about this consumer ornull.java.lang.StringgetDurableName()Returns the name of the consumer's durable subscription ornull.longgetID()Returns consumer ID.longgetPendingMessageCount()Returns number of pending messages for a topic consumer.longgetPendingMessageSize()Returns combined size of pending messages for a topic consumer.java.lang.StringgetSelector()Returns consumer's selector ornull.longgetSessionID()Returns consumer's session ID or 0.java.lang.StringgetSharedSubscriptionName()Returns the name of the shared subscription.StatDatagetStatistics()Returns consumer's total statistics ornull.java.lang.StringgetUsername()Returns consumer's user name ornull.booleanhasSelector()Returnstrueif this consumer has selector.booleanisConnected()Returnstrueif this consumer is connected to the server.booleanisConnectionConsumer()Returnstrueif this is connection consumer.booleanisMulticast()Deprecated.As of release 8.3booleanisNolocal()Returnstrueif this is a nolocal topic consumer.booleanisShared()Returnstrueif this is a shared topic consumer.java.lang.StringtoString()Returns string representation of this object.
 
- 
- 
- 
Constructor Detail- 
ConsumerInfopublic ConsumerInfo(java.lang.Object json) throws JMSExceptionFor Internal use only, may be removed or deprecated in future.- Throws:
- JMSException
 
 
- 
 - 
Method Detail- 
getIDpublic long getID() Returns consumer ID. All consumers have unique positive ID.- Returns:
- consumer ID.
 
 - 
getConnectionIDpublic long getConnectionID() Return the consumer's connection ID or 0. If this is a durable topic subscriber which is currently not connected, this method returns 0, which is never a valid connection ID.- Returns:
- consumer's connection ID or 0 if this is a disconnected durable topic subscriber.
 
 - 
getSessionIDpublic long getSessionID() Returns consumer's session ID or 0. If this is a durable topic subscriber which is currently not connected, this method returns 0, which is never a valid session ID- Returns:
- consumer's session ID or 0.
 
 - 
getCreateTimepublic long getCreateTime() Returns consumer's creation time in milliseconds.- Returns:
- consumer's creation time in milliseconds.
 
 - 
getUsernamepublic java.lang.String getUsername() Returns consumer's user name ornull. This method returnsnullfor disconnected durable topic subscribers.- Returns:
- consumer's user name or null.
 
 - 
getDurableNamepublic java.lang.String getDurableName() Returns the name of the consumer's durable subscription ornull. Only durable topic consumers have durable name. This method returnsnullfor non-durable topic subscribers and queue receivers.- Returns:
- consumer's durable name or nullif the consumer is not a durable topic consumer.
 
 - 
getDestinationTypepublic int getDestinationType() Returns consumer's destination type. Returned value is one ofDestinationInfo.TOPIC_TYPEorDestinationInfo.QUEUE_TYPE.- Returns:
- consumer's destination type.
 
 - 
getDestinationNamepublic java.lang.String getDestinationName() Returns consumer's destination name.- Returns:
- consumer's destination name.
 
 - 
getPendingMessageCountpublic long getPendingMessageCount() Returns number of pending messages for a topic consumer. Notice that only topic consumers have pending messages. For queue consumers the number of pending messages in the corresponding queue must be obtained via the queue itself.- Returns:
- number of pending messages, possibly 0. Always returns 0 if this is a queue consumer.
- Since:
- EMS 4.4
- See Also:
- getPendingMessageSize(),- ConsumerInfo.Details.getCurrentMsgCountSentByServer()
 
 - 
getPendingMessageSizepublic long getPendingMessageSize() Returns combined size of pending messages for a topic consumer.- Returns:
- cumulative size of pending messages, possibly 0. Always returns 0 if this is a queue consumer.
- Since:
- EMS 4.4
- See Also:
- getPendingMessageCount(),- ConsumerInfo.Details.getCurrentMsgSizeSentByServer()
 
 - 
getSelectorpublic java.lang.String getSelector() Returns consumer's selector ornull. Notice thatConsumerInfomay or may not have the consumer's selector information depending on the way it was obtained, however methodhasSelectorcan be called in all cases to determine if consumer has a selector. MethodTibjmsAdmin.getConsumer(long)always includes the selector text, if present, into returned consumer object. Methods returning multiple consumers include or do not include selector text depending on the flagTibjmsAdmin.GET_SELECTOR.- Returns:
- consumer's selector or nullif this consumer has no selector.
- Since:
- EMS 4.4
- See Also:
- TibjmsAdmin.GET_SELECTOR
 
 - 
hasSelectorpublic boolean hasSelector() Returnstrueif this consumer has selector. Notice the selector itself may or may not be contained in the consumer object, depending on the way consumer information was obtained. However this method can be used in all cases to determine if a consumer has selector. MethodTibjmsAdmin.getConsumer(long)always includes the selector text, if present, into returned consumer object. Methods returning multiple consumers include or do not include selector text depending on the flagTibjmsAdmin.GET_SELECTOR.- Returns:
- trueif this consumer has selector,- falseotherwise.
- Since:
- EMS 4.4
- See Also:
- getSelector(),- TibjmsAdmin.GET_SELECTOR
 
 - 
isNolocalpublic boolean isNolocal() Returnstrueif this is a nolocal topic consumer.- Returns:
- trueif this is a nolocal topic consumer. Always returns- falseif this is a queue consumer.
- Since:
- EMS 4.4
 
 - 
isMulticast@Deprecated public boolean isMulticast() Deprecated.As of release 8.3Returnstrueif this topic consumer is receiving multicast messages.- Returns:
- trueif this topic consumer is receiving multicast messages. Always returns- falseif this is a queue consumer.
- Since:
- EMS 5.0
 
 - 
getStatisticspublic StatData getStatistics() Returns consumer's total statistics ornull.This method may return nulldesignating that no statistical information is available for this consumer. This can happen for any of the following reasons:- if statistics are disabled in the server; 
 - if statistics was not included into this consumer information object by the method ofTibjmsAdminclass used to obtain this object.- Returns:
- consumer's total statistics or nullif statistics is not available.
 
 - 
getDetailedStatisticspublic DetailedDestStat[] getDetailedStatistics() Returns detailed statistics for a wildcarded consumer. Detailed statistics gives a break down of the consumer's aggregate statistics across the different destinations that it has received messages on.This method may return nulldesignating that no detailed statistics are available for this consumer. This can happen for any of the following reasons:- if consumer is not a wildcarded consumer; 
 - if detailed statistics are disabled in the server;
 - if detailed statistics were not included into this consumer information object by the method ofTibjmsAdminclass used to obtain this object.- Returns:
- consumer's detailed statistics or nullif detailed statistics are not available.
 
 - 
getDetailspublic ConsumerInfo.Details getDetails() Returns additional details about this consumer ornull. This method returnsnullif this object has been obtained viaTibjmsAdmin.getConsumersStatistics()method. If this consumer was obtained via methodsTibjmsAdmin.getConsumers()orTibjmsAdmin.getConsumer(long), this method returns non-nullvalue containing detailed information about consumer.- Returns:
- detailed information object or null
- Since:
- EMS 4.4
 
 - 
isConnectedpublic boolean isConnected() Returnstrueif this consumer is connected to the server. Only durable topic subscribers may be in disconnected state. This method always returnstruefor queue receivers and non-durable topic consumers.- Returns:
- trueif this consumer connected to server,- falseotherwise.
- Since:
- EMS 4.4
 
 - 
isConnectionConsumerpublic boolean isConnectionConsumer() Returnstrueif this is connection consumer. Notice that for disconnected durable topic subscribers this method returnsfalseeven if the durable has been originally created as connection consumer.- Returns:
- trueif this is a connection consumer,- falseotherwise.
- Since:
- EMS 4.4
 
 - 
isSharedpublic boolean isShared() Returnstrueif this is a shared topic consumer. The shared subscription name is returned bygetSharedSubscriptionName().- Returns:
- trueif this topic consumer is on a shared subscription. Always returns- falsefor queue consumers.
- Since:
- EMS 8.0
 
 - 
getSharedSubscriptionNamepublic java.lang.String getSharedSubscriptionName() Returns the name of the shared subscription. For shared durable consumers, this is equivalent to the durable name.- Returns:
- the name of the shared subscription, or nullif the consumer is not a shared consumer or is a queue consumer.
- Since:
- EMS 8.0
 
 - 
toStringpublic java.lang.String toString() Returns string representation of this object.- Overrides:
- toStringin class- java.lang.Object
 
 - 
frompublic static ConsumerInfo from(javax.management.openmbean.CompositeData cd) throws java.lang.Exception For Internal use only, may be removed or deprecated in future.- Returns:
- a ConsumerInfo object from CompositeData
- Throws:
- java.lang.IllegalArgumentException- if CompositeType does not match or if a null CompositeData is passed.
- java.lang.Exception
 
 
- 
 
-