public class Subscription extends Object
Subscription
class is a utility class needed to show
information about client subscription.
Be careful, contrary to user, queue or topic administration object, the
Subscription
object is just a data structure; it is initialized
by user.getSubscription()
methods and no longer keep consistent
with the real state of subscription.
Modifier and Type | Field and Description |
---|---|
private int |
ackCount
Number of pending acks for this subscription.
|
private boolean |
durable
True if the subscription is durable.
|
private int |
messageCount
Number of pending messages for this subscription.
|
private String |
name
Name of the subscription.
|
private String |
topicId
Related topic unique identification.
|
Constructor and Description |
---|
Subscription(String name,
String topicId,
int messageCount,
int ackCount,
boolean durable)
Creates a new
Subscription object. |
Modifier and Type | Method and Description |
---|---|
int |
getDeliveredMessageCount()
Returns the number of messages delivered and waiting for acknowledge.
|
int |
getMessageCount()
Returns the number of pending messages.
|
String |
getName()
Returns the subscription's name.
|
String |
getTopicId()
Returns the related topic unique identification.
|
boolean |
isDurable()
Returns true if the subscription is durable, false otherwise.
|
String |
toString()
Returns a String image of the subscription.
|
private String name
private String topicId
private int messageCount
private int ackCount
private boolean durable
public final String getName()
public final String getTopicId()
public final int getMessageCount()
public final int getDeliveredMessageCount()
public final boolean isDurable()
Copyright © 2021 ScalAgent D.T.. All rights reserved.