Skip navigation links
TIBCO Enterprise Message Service
com.tibco.tibjms.admin

Class ConsumerInfo

    • Method Detail

      • getID

        public long getID()
        Returns consumer ID. All consumers have unique positive ID.
        Returns:
        consumer ID.
      • getConnectionID

        public 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.
      • getSessionID

        public 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.
      • getCreateTime

        public long getCreateTime()
        Returns consumer's creation time in milliseconds.
        Returns:
        consumer's creation time in milliseconds.
      • getUsername

        public java.lang.String getUsername()
        Returns consumer's user name or null. This method returns null for disconnected durable topic subscribers.
        Returns:
        consumer's user name or null.
      • getDurableName

        public java.lang.String getDurableName()
        Returns the name of the consumer's durable subscription or null. Only durable topic consumers have durable name. This method returns null for non-durable topic subscribers and queue receivers.
        Returns:
        consumer's durable name or null if the consumer is not a durable topic consumer.
      • getDestinationName

        public java.lang.String getDestinationName()
        Returns consumer's destination name.
        Returns:
        consumer's destination name.
      • getPendingMessageCount

        public 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()
      • getSelector

        public java.lang.String getSelector()
        Returns consumer's selector or 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.
        Returns:
        consumer's selector or null if this consumer has no selector.
        Since:
        EMS 4.4
        See Also:
        TibjmsAdmin.GET_SELECTOR
      • hasSelector

        public boolean hasSelector()
        Returns 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.
        Returns:
        true if this consumer has selector, false otherwise.
        Since:
        EMS 4.4
        See Also:
        getSelector(), TibjmsAdmin.GET_SELECTOR
      • isNolocal

        public boolean isNolocal()
        Returns true if this is a nolocal topic consumer.
        Returns:
        true if this is a nolocal topic consumer. Always returns false if this is a queue consumer.
        Since:
        EMS 4.4
      • isMulticast

        @Deprecated
        public boolean isMulticast()
        Deprecated. As of release 8.3
        Returns true if this topic consumer is receiving multicast messages.
        Returns:
        true if this topic consumer is receiving multicast messages. Always returns false if this is a queue consumer.
        Since:
        EMS 5.0
      • getStatistics

        public StatData getStatistics()
        Returns consumer's total statistics or 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.

        Returns:
        consumer's total statistics or null if statistics is not available.
      • getDetailedStatistics

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

        Returns:
        consumer's detailed statistics or null if detailed statistics are not available.
      • isConnected

        public boolean isConnected()
        Returns 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.
        Returns:
        true if this consumer connected to server, false otherwise.
        Since:
        EMS 4.4
      • isConnectionConsumer

        public boolean isConnectionConsumer()
        Returns 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.
        Returns:
        true if this is a connection consumer, false otherwise.
        Since:
        EMS 4.4
      • isShared

        public boolean isShared()
        Returns true if this is a shared topic consumer. The shared subscription name is returned by getSharedSubscriptionName().
        Returns:
        true if this topic consumer is on a shared subscription. Always returns false for queue consumers.
        Since:
        EMS 8.0
      • getSharedSubscriptionName

        public 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 null if the consumer is not a shared consumer or is a queue consumer.
        Since:
        EMS 8.0
      • toString

        public java.lang.String toString()
        Returns string representation of this object.
        Overrides:
        toString in class java.lang.Object
      • from

        public 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
TIBCO Enterprise Message Service

Copyright © Cloud Software Group, Inc. All rights reserved