org.apache.activemq.broker.jmx
Class DurableSubscriptionView
java.lang.Object
org.apache.activemq.broker.jmx.SubscriptionView
org.apache.activemq.broker.jmx.DurableSubscriptionView
- All Implemented Interfaces:
- DurableSubscriptionViewMBean, SubscriptionViewMBean
- Direct Known Subclasses:
- InactiveDurableSubscriptionView
public class DurableSubscriptionView
- extends SubscriptionView
- implements DurableSubscriptionViewMBean
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, 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, isNoLocal, isRetroactive, isSlowConsumer, setSelector |
broker
protected ManagedRegionBroker broker
subscriptionName
protected java.lang.String subscriptionName
durableSub
protected DurableTopicSubscription durableSub
DurableSubscriptionView
public DurableSubscriptionView(ManagedRegionBroker broker,
java.lang.String clientId,
java.lang.String userName,
Subscription sub)
- Constructor
- Parameters:
clientId
- sub
-
getSubscriptionName
public java.lang.String getSubscriptionName()
- Specified by:
getSubscriptionName
in interface DurableSubscriptionViewMBean
- Returns:
- name of the durable consumer
browse
public javax.management.openmbean.CompositeData[] browse()
throws javax.management.openmbean.OpenDataException
- Browse messages for this durable subscriber
- Specified by:
browse
in interface DurableSubscriptionViewMBean
- Returns:
- messages
- Throws:
javax.management.openmbean.OpenDataException
browseAsTable
public javax.management.openmbean.TabularData browseAsTable()
throws javax.management.openmbean.OpenDataException
- Browse messages for this durable subscriber
- Specified by:
browseAsTable
in interface DurableSubscriptionViewMBean
- Returns:
- messages
- Throws:
javax.management.openmbean.OpenDataException
destroy
public void destroy()
throws java.lang.Exception
- Destroys the durable subscription so that messages will no longer be
stored for this subscription
- Specified by:
destroy
in interface DurableSubscriptionViewMBean
- Throws:
java.lang.Exception
toString
public java.lang.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-2016. All Rights Reserved.