Overview | Package | Class | Tree | Deprecated | Index | Help
| TIBCO Enterprise Message Service
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tibco.tibjms.admin
Class ConsumerInfo

    java.lang.Object
      com.tibco.tibjms.admin.ConsumerInfo

    public class ConsumerInfo

extends java.lang.Object

Represents message consumer in EMS server.

See Also:
  `TibjmsAdmin.getConsumers()`, `TibjmsAdmin.getConsumers(Long,String,DestinationInfo,boolean,int)`, `TibjmsAdmin.getConsumer(long)`, `TibjmsAdmin.getConsumersStatistics()`

Nested Class Summary
`class` | `ConsumerInfo.Details` Provides additional information about consumer.

Method Summary
`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.
`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()` Returns `true` if this topic consumer is receiving multicast messages.
`boolean` | `isNolocal()` Returns `true` if this is a nolocal topic consumer.
`java.lang.String` | `toString()` Returns string representation of this object.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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.

### getDestinationType

    public int getDestinationType()

  Returns consumer's destination type. Returned value is one of `DestinationInfo.TOPIC_TYPE` or `DestinationInfo.QUEUE_TYPE`.

  Returns:
    consumer's destination type.

### 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()`

### getPendingMessageSize

    public 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()`

### 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

    public boolean isMulticast()

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

### getDetails

    public ConsumerInfo.Details getDetails()

  Returns additional details about this consumer or null. This method returns `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.

  ``
  Returns:
    detailed information object or `null`
  Since:
    EMS 4.4

### 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

### toString

    public java.lang.String toString()

  Returns string representation of this object.

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
| TIBCO Enterprise Message Service
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © TIBCO Software Inc. All rights reserved