Class Subscription
- java.lang.Object
-
- org.objectweb.joram.client.jms.admin.Subscription
-
public class Subscription extends Object
TheSubscriptionclass is a utility class needed to show information about client subscription.Be careful, contrary to user, queue or topic administration object, the
Subscriptionobject is just a data structure; it is initialized byuser.getSubscription()methods and no longer keep consistent with the real state of subscription.
-
-
Field Summary
Fields Modifier and Type Field Description private intackCountNumber of pending acks for this subscription.private booleandurableTrue if the subscription is durable.private intmessageCountNumber of pending messages for this subscription.private StringnameName of the subscription.private StringtopicIdRelated topic unique identification.
-
Constructor Summary
Constructors Constructor Description Subscription(String name, String topicId, int messageCount, int ackCount, boolean durable)Creates a newSubscriptionobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDeliveredMessageCount()Returns the number of messages delivered and waiting for acknowledge.intgetMessageCount()Returns the number of pending messages.StringgetName()Returns the subscription's name.StringgetTopicId()Returns the related topic unique identification.booleanisDurable()Returns true if the subscription is durable, false otherwise.StringtoString()Returns a String image of the subscription.
-
-
-
Field Detail
-
name
private String name
Name of the subscription.
-
topicId
private String topicId
Related topic unique identification.
-
messageCount
private int messageCount
Number of pending messages for this subscription.
-
ackCount
private int ackCount
Number of pending acks for this subscription.
-
durable
private boolean durable
True if the subscription is durable.
-
-
Method Detail
-
getName
public final String getName()
Returns the subscription's name.- Returns:
- the subscription's name.
-
getTopicId
public final String getTopicId()
Returns the related topic unique identification.- Returns:
- the related topic unique identification.
-
getMessageCount
public final int getMessageCount()
Returns the number of pending messages.- Returns:
- the number of pending messages.
-
getDeliveredMessageCount
public final int getDeliveredMessageCount()
Returns the number of messages delivered and waiting for acknowledge.- Returns:
- The number of messages delivered and waiting for acknowledge.
-
isDurable
public final boolean isDurable()
Returns true if the subscription is durable, false otherwise.- Returns:
- true if the subscription is durable, false otherwise.
-
-