public class ConsumerInfo
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ConsumerInfo.Details
Provides additional information about consumer.
|
Modifier and Type | Method and Description |
---|---|
static ConsumerInfo |
from(javax.management.openmbean.CompositeData cd)
For Internal use only, may be removed or deprecated in future.
|
long |
getConnectionID()
Return the consumer's connection ID or 0.
|
long |
getCreateTime()
Returns consumer's creation time in milliseconds.
|
java.lang.String |
getDestinationName()
Returns consumer's destination name.
|
int |
getDestinationType()
Returns consumer's destination type.
|
DetailedDestStat[] |
getDetailedStatistics()
Returns detailed statistics for a wildcarded consumer.
|
ConsumerInfo.Details |
getDetails()
Returns additional details about this consumer or null.
|
java.lang.String |
getDurableName()
Returns the name of the consumer's durable subscription or
null . |
long |
getID()
Returns consumer ID.
|
long |
getPendingMessageCount()
Returns number of pending messages for a topic consumer.
|
long |
getPendingMessageSize()
Returns combined size of pending messages for a topic consumer.
|
java.lang.String |
getSelector()
Returns consumer's selector or
null . |
long |
getSessionID()
Returns consumer's session ID or 0.
|
java.lang.String |
getSharedSubscriptionName()
Returns the name of the shared subscription.
|
StatData |
getStatistics()
Returns consumer's total statistics or
null . |
java.lang.String |
getUsername()
Returns consumer's user name or
null . |
boolean |
hasSelector()
Returns
true if this consumer has selector. |
boolean |
isConnected()
Returns
true if this consumer is connected to the server. |
boolean |
isConnectionConsumer()
Returns
true if this is connection consumer. |
boolean |
isMulticast()
Deprecated.
As of release 8.3
|
boolean |
isNolocal()
Returns
true if this is a nolocal topic consumer. |
boolean |
isShared()
Returns
true if this is a shared topic consumer. |
java.lang.String |
toString()
Returns string representation of this object.
|
public long getID()
public long getConnectionID()
public long getSessionID()
public long getCreateTime()
public java.lang.String getUsername()
null
.
This method returns null
for disconnected
durable topic subscribers.null
.public java.lang.String getDurableName()
null
.
Only durable topic consumers have durable name. This method returns
null
for non-durable topic subscribers and queue receivers.null
if
the consumer is not a durable topic consumer.public int getDestinationType()
DestinationInfo.TOPIC_TYPE
or
DestinationInfo.QUEUE_TYPE
.public java.lang.String getDestinationName()
public long getPendingMessageCount()
getPendingMessageSize()
,
ConsumerInfo.Details.getCurrentMsgCountSentByServer()
public long getPendingMessageSize()
getPendingMessageCount()
,
ConsumerInfo.Details.getCurrentMsgSizeSentByServer()
public java.lang.String getSelector()
null
.
Notice that ConsumerInfo
may or may not have the
consumer's selector information depending on the way it was
obtained, however method hasSelector
can be called
in all cases to determine if consumer has a selector.
Method TibjmsAdmin.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 flag TibjmsAdmin.GET_SELECTOR
.null
if this consumer has no selector.TibjmsAdmin.GET_SELECTOR
public boolean hasSelector()
true
if 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.
Method TibjmsAdmin.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 flag TibjmsAdmin.GET_SELECTOR
.true
if this consumer has selector, false
otherwise.getSelector()
,
TibjmsAdmin.GET_SELECTOR
public boolean isNolocal()
true
if this is a nolocal topic consumer.true
if this is a nolocal topic consumer.
Always returns false
if this is a queue consumer.@Deprecated public boolean isMulticast()
true
if this topic consumer is receiving
multicast messages.true
if this topic consumer is receiving
multicast messages.
Always returns false
if this is a queue consumer.public StatData getStatistics()
null
.
This method may return null
designating 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 of TibjmsAdmin
class used to obtain
this object.
null
if statistics
is not available.public DetailedDestStat[] getDetailedStatistics()
This method may return null
designating 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 of TibjmsAdmin
class used to obtain this
object.
null
if detailed
statistics are not available.public ConsumerInfo.Details getDetails()
null
if this object has been obtained
via TibjmsAdmin.getConsumersStatistics()
method. If
this consumer was obtained via methods TibjmsAdmin.getConsumers()
or TibjmsAdmin.getConsumer(long)
, this method returns non-null
value containing detailed information about consumer.null
public boolean isConnected()
true
if this consumer is connected to the server.
Only durable topic subscribers may be in disconnected state.
This method always returns true
for queue receivers
and non-durable topic consumers.true
if this consumer connected to server,
false
otherwise.public boolean isConnectionConsumer()
true
if this is connection consumer.
Notice that for disconnected durable topic subscribers
this method returns false
even if the durable has been
originally created as connection consumer.true
if this is a connection consumer,
false
otherwise.public boolean isShared()
true
if this is a shared topic consumer.
The shared subscription name is returned by
getSharedSubscriptionName()
.true
if this topic consumer is on a shared
subscription. Always returns false
for queue consumers.public java.lang.String getSharedSubscriptionName()
null
if the consumer is not a shared consumer or is a queue consumer.public java.lang.String toString()
toString
in class java.lang.Object
public static ConsumerInfo from(javax.management.openmbean.CompositeData cd) throws java.lang.Exception
java.lang.IllegalArgumentException
- if CompositeType does not match
or if a null CompositeData is passed.java.lang.Exception
Copyright © Cloud Software Group, Inc. All rights reserved