org.apache.activemq.broker.jmx
Class SubscriptionView
java.lang.Object
org.apache.activemq.broker.jmx.SubscriptionView
- All Implemented Interfaces:
- SubscriptionViewMBean
- Direct Known Subclasses:
- DurableSubscriptionView, InactiveDurableSubscriptionView, TopicSubscriptionView
public class SubscriptionView
- extends java.lang.Object
- implements SubscriptionViewMBean
- Version:
- $Revision: 1.5 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
subscription
protected final Subscription subscription
clientId
protected final java.lang.String clientId
SubscriptionView
public SubscriptionView(java.lang.String clientId,
Subscription subs)
- Constructor
- Parameters:
subs
-
getClientId
public java.lang.String getClientId()
- Specified by:
getClientId
in interface SubscriptionViewMBean
- Returns:
- the clientId
getConnectionId
public java.lang.String getConnectionId()
- Specified by:
getConnectionId
in interface SubscriptionViewMBean
- Returns:
- the id of the Connection the Subscription is on
getSessionId
public long getSessionId()
- Specified by:
getSessionId
in interface SubscriptionViewMBean
- Returns:
- the id of the Session the subscription is on
getSubcriptionId
public long getSubcriptionId()
- Specified by:
getSubcriptionId
in interface SubscriptionViewMBean
- Returns:
- the id of the Subscription
getDestinationName
public java.lang.String getDestinationName()
- Specified by:
getDestinationName
in interface SubscriptionViewMBean
- Returns:
- the destination name
getSelector
public java.lang.String getSelector()
- Specified by:
getSelector
in interface SubscriptionViewMBean
- Returns:
- the JMS selector on the current subscription
setSelector
public void setSelector(java.lang.String selector)
throws javax.jms.InvalidSelectorException,
java.lang.UnsupportedOperationException
- Description copied from interface:
SubscriptionViewMBean
- Attempts to change the current active selector on the subscription. This
operation is not supported for persistent topics.
- Specified by:
setSelector
in interface SubscriptionViewMBean
- Throws:
javax.jms.InvalidSelectorException
java.lang.UnsupportedOperationException
isDestinationQueue
public boolean isDestinationQueue()
- Specified by:
isDestinationQueue
in interface SubscriptionViewMBean
- Returns:
- true if the destination is a Queue
isDestinationTopic
public boolean isDestinationTopic()
- Specified by:
isDestinationTopic
in interface SubscriptionViewMBean
- Returns:
- true of the destination is a Topic
isDestinationTemporary
public boolean isDestinationTemporary()
- Specified by:
isDestinationTemporary
in interface SubscriptionViewMBean
- Returns:
- true if the destination is temporary
isActive
public boolean isActive()
- Specified by:
isActive
in interface SubscriptionViewMBean
- Returns:
- true if the subscriber is active
gc
public void gc()
- The subscription should release as may references as it can to help the garbage collector
reclaim memory.
isRetroactive
public boolean isRetroactive()
- Specified by:
isRetroactive
in interface SubscriptionViewMBean
- Returns:
- whether or not the subscriber is retroactive or not
isExclusive
public boolean isExclusive()
- Specified by:
isExclusive
in interface SubscriptionViewMBean
- Returns:
- whether or not the subscriber is an exclusive consumer
isDurable
public boolean isDurable()
- Specified by:
isDurable
in interface SubscriptionViewMBean
- Returns:
- whether or not the subscriber is durable (persistent)
isNoLocal
public boolean isNoLocal()
- Specified by:
isNoLocal
in interface SubscriptionViewMBean
- Returns:
- whether or not the subscriber ignores local messages
getMaximumPendingMessageLimit
public int getMaximumPendingMessageLimit()
- Specified by:
getMaximumPendingMessageLimit
in interface SubscriptionViewMBean
- Returns:
- the maximum number of pending messages allowed in addition to the prefetch size. If enabled
to a non-zero value then this will perform eviction of messages for slow consumers on non-durable topics.
getPriority
public byte getPriority()
- Specified by:
getPriority
in interface SubscriptionViewMBean
- Returns:
- the consumer priority
getSubcriptionName
public java.lang.String getSubcriptionName()
- Specified by:
getSubcriptionName
in interface SubscriptionViewMBean
- Returns:
- the name of the consumer which is only used for durable consumers.
getPendingQueueSize
public int getPendingQueueSize()
- Specified by:
getPendingQueueSize
in interface SubscriptionViewMBean
- Returns:
- number of messages pending delivery
getDispatchedQueueSize
public int getDispatchedQueueSize()
- Specified by:
getDispatchedQueueSize
in interface SubscriptionViewMBean
- Returns:
- number of messages dispatched
getDispachedCounter
public long getDispachedCounter()
- Specified by:
getDispachedCounter
in interface SubscriptionViewMBean
- Returns:
- number of messages that matched the subscription
getEnqueueCounter
public long getEnqueueCounter()
- Specified by:
getEnqueueCounter
in interface SubscriptionViewMBean
- Returns:
- number of messages that matched the subscription
getDequeueCounter
public long getDequeueCounter()
- Specified by:
getDequeueCounter
in interface SubscriptionViewMBean
- Returns:
- number of messages queued by the client
getConsumerInfo
protected ConsumerInfo getConsumerInfo()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
- pretty print
getPrefetchSize
public int getPrefetchSize()
- Specified by:
getPrefetchSize
in interface SubscriptionViewMBean
- Returns:
- the prefetch that has been configured for this subscriber
Copyright © 2009 Apache Software Foundation. All Rights Reserved.