org.apache.activemq.broker.jmx
Class SubscriptionView

java.lang.Object
  extended by 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 $

Field Summary
protected  java.lang.String clientId
           
protected  Subscription subscription
           
 
Constructor Summary
SubscriptionView(java.lang.String clientId, Subscription subs)
          Constructor
 
Method Summary
 void gc()
          The subscription should release as may references as it can to help the garbage collector reclaim memory.
 java.lang.String getClientId()
           
 java.lang.String getConnectionId()
           
protected  ConsumerInfo getConsumerInfo()
           
 long getDequeueCounter()
           
 java.lang.String getDestinationName()
           
 long getDispachedCounter()
           
 int getDispatchedQueueSize()
           
 long getEnqueueCounter()
           
 int getMaximumPendingMessageLimit()
           
 int getPendingQueueSize()
           
 int getPrefetchSize()
           
 byte getPriority()
           
 java.lang.String getSelector()
           
 long getSessionId()
           
 long getSubcriptionId()
           
 java.lang.String getSubcriptionName()
           
 boolean isActive()
           
 boolean isDestinationQueue()
           
 boolean isDestinationTemporary()
           
 boolean isDestinationTopic()
           
 boolean isDurable()
           
 boolean isExclusive()
           
 boolean isNoLocal()
           
 boolean isRetroactive()
           
 void setSelector(java.lang.String selector)
          Attempts to change the current active selector on the subscription.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

subscription

protected final Subscription subscription

clientId

protected final java.lang.String clientId
Constructor Detail

SubscriptionView

public SubscriptionView(java.lang.String clientId,
                        Subscription subs)
Constructor

Parameters:
subs -
Method Detail

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 © 2010 Apache Software Foundation. All Rights Reserved.