org.apache.activemq.broker.jmx
Class DurableSubscriptionView

java.lang.Object
  extended by org.apache.activemq.broker.jmx.SubscriptionView
      extended by org.apache.activemq.broker.jmx.DurableSubscriptionView
All Implemented Interfaces:
DurableSubscriptionViewMBean, SubscriptionViewMBean
Direct Known Subclasses:
InactiveDurableSubscriptionView

public class DurableSubscriptionView
extends SubscriptionView
implements DurableSubscriptionViewMBean


Field Summary
protected  ManagedRegionBroker broker
           
protected  BrokerService brokerService
           
protected  DurableTopicSubscription durableSub
           
protected  String subscriptionName
           
 
Fields inherited from class org.apache.activemq.broker.jmx.SubscriptionView
clientId, subscription, userName
 
Constructor Summary
DurableSubscriptionView(ManagedRegionBroker broker, BrokerService brokerService, String clientId, String userName, Subscription sub)
          Constructor
 
Method Summary
 CompositeData[] browse()
          Browse messages for this durable subscriber
 TabularData browseAsTable()
          Browse messages for this durable subscriber
 int cursorSize()
           
 void destroy()
          Destroys the durable subscription so that messages will no longer be stored for this subscription
 boolean doesCursorHaveMessagesBuffered()
           
 boolean doesCursorHaveSpace()
           
 long getCursorMemoryUsage()
           
 int getCursorPercentUsage()
           
 String getSubscriptionName()
           
 boolean isActive()
           
 boolean isCursorFull()
           
 String toString()
           
 
Methods inherited from class org.apache.activemq.broker.jmx.SubscriptionView
gc, getClientId, getConnection, getConnectionId, getConsumerInfo, getDequeueCounter, getDestinationName, getDispatchedCounter, getDispatchedQueueSize, getEnqueueCounter, getMaximumPendingMessageLimit, getMessageCountAwaitingAcknowledge, getPendingQueueSize, getPrefetchSize, getPriority, getSelector, getSessionId, getSubcriptionId, getSubcriptionName, getUserName, isDestinationQueue, isDestinationTemporary, isDestinationTopic, isDurable, isExclusive, isMatchingQueue, isMatchingTopic, isNetwork, isNoLocal, isRetroactive, isSlowConsumer, matchesDestination, setSelector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.activemq.broker.jmx.SubscriptionViewMBean
getClientId, getConnection, getConnectionId, getDequeueCounter, getDestinationName, getDispatchedCounter, getDispatchedQueueSize, getEnqueueCounter, getMaximumPendingMessageLimit, getMessageCountAwaitingAcknowledge, getPendingQueueSize, getPrefetchSize, getPriority, getSelector, getSessionId, getSubcriptionId, getSubcriptionName, getUserName, isDestinationQueue, isDestinationTemporary, isDestinationTopic, isDurable, isExclusive, isMatchingQueue, isMatchingTopic, isNetwork, isNoLocal, isRetroactive, isSlowConsumer, setSelector
 

Field Detail

broker

protected ManagedRegionBroker broker

brokerService

protected BrokerService brokerService

subscriptionName

protected String subscriptionName

durableSub

protected DurableTopicSubscription durableSub
Constructor Detail

DurableSubscriptionView

public DurableSubscriptionView(ManagedRegionBroker broker,
                               BrokerService brokerService,
                               String clientId,
                               String userName,
                               Subscription sub)
Constructor

Parameters:
clientId -
sub -
Method Detail

getSubscriptionName

public String getSubscriptionName()
Specified by:
getSubscriptionName in interface DurableSubscriptionViewMBean
Returns:
name of the durable consumer

browse

public CompositeData[] browse()
                       throws OpenDataException
Browse messages for this durable subscriber

Specified by:
browse in interface DurableSubscriptionViewMBean
Returns:
messages
Throws:
OpenDataException

browseAsTable

public TabularData browseAsTable()
                          throws OpenDataException
Browse messages for this durable subscriber

Specified by:
browseAsTable in interface DurableSubscriptionViewMBean
Returns:
messages
Throws:
OpenDataException

destroy

public void destroy()
             throws Exception
Destroys the durable subscription so that messages will no longer be stored for this subscription

Specified by:
destroy in interface DurableSubscriptionViewMBean
Throws:
Exception

toString

public String toString()
Overrides:
toString in class SubscriptionView
Returns:
pretty print

cursorSize

public int cursorSize()
Specified by:
cursorSize in interface DurableSubscriptionViewMBean
Returns:
the number of messages available to be paged in by the cursor

doesCursorHaveMessagesBuffered

public boolean doesCursorHaveMessagesBuffered()
Specified by:
doesCursorHaveMessagesBuffered in interface DurableSubscriptionViewMBean
Returns:
true if the cursor has messages buffered to deliver

doesCursorHaveSpace

public boolean doesCursorHaveSpace()
Specified by:
doesCursorHaveSpace in interface DurableSubscriptionViewMBean
Returns:
true if the message cursor has memory space available to page in more messages

getCursorMemoryUsage

public long getCursorMemoryUsage()
Specified by:
getCursorMemoryUsage in interface DurableSubscriptionViewMBean
Returns:
the cursor memory usage in bytes

getCursorPercentUsage

public int getCursorPercentUsage()
Specified by:
getCursorPercentUsage in interface DurableSubscriptionViewMBean
Returns:
the cursor memory usage as a percentage

isCursorFull

public boolean isCursorFull()
Specified by:
isCursorFull in interface DurableSubscriptionViewMBean
Returns:
true if the cursor has reached its memory limit for paged in messages

isActive

public boolean isActive()
Specified by:
isActive in interface SubscriptionViewMBean
Overrides:
isActive in class SubscriptionView
Returns:
true if the subscriber is active


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.