Package 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
-
-
Field Summary
Fields Modifier and Type Field Description protected ManagedRegionBrokerbrokerprotected BrokerServicebrokerServiceprotected DurableTopicSubscriptiondurableSubprotected StringsubscriptionName-
Fields inherited from class org.apache.activemq.broker.jmx.SubscriptionView
clientId, subscription, userName
-
-
Constructor Summary
Constructors Constructor Description DurableSubscriptionView(ManagedRegionBroker broker, BrokerService brokerService, String clientId, String userName, Subscription sub)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositeData[]browse()Browse messages for this durable subscriberTabularDatabrowseAsTable()Browse messages for this durable subscriberintcursorSize()voiddestroy()Destroys the durable subscription so that messages will no longer be stored for this subscriptionbooleandoesCursorHaveMessagesBuffered()booleandoesCursorHaveSpace()longgetCursorMemoryUsage()intgetCursorPercentUsage()StringgetSubscriptionName()booleanisActive()booleanisCursorFull()voidremoveMessage(String messageId)Removes a message from the durable subscription.StringtoString()-
Methods inherited from class org.apache.activemq.broker.jmx.SubscriptionView
gc, getClientId, getConnection, getConnectionId, getConsumedCount, getConsumerInfo, getDequeueCounter, getDestinationName, getDispatchedCounter, getDispatchedQueueSize, getEnqueueCounter, getMaximumPendingMessageLimit, getMessageCountAwaitingAcknowledge, getPendingQueueSize, getPrefetchSize, getPriority, getSelector, getSessionId, getSubscriptionId, getUserName, isDestinationQueue, isDestinationTemporary, isDestinationTopic, isDispatchAsync, isDurable, isExclusive, isMatchingQueue, isMatchingTopic, isNetwork, isNoLocal, isRetroactive, isSlowConsumer, matchesDestination, resetStatistics, 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, getConsumedCount, getDequeueCounter, getDestinationName, getDispatchedCounter, getDispatchedQueueSize, getEnqueueCounter, getMaximumPendingMessageLimit, getMessageCountAwaitingAcknowledge, getPendingQueueSize, getPrefetchSize, getPriority, getSelector, getSessionId, getSubscriptionId, getUserName, isDestinationQueue, isDestinationTemporary, isDestinationTopic, isDispatchAsync, isDurable, isExclusive, isMatchingQueue, isMatchingTopic, isNetwork, isNoLocal, isRetroactive, isSlowConsumer, resetStatistics, 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:
getSubscriptionNamein interfaceDurableSubscriptionViewMBean- Specified by:
getSubscriptionNamein interfaceSubscriptionViewMBean- Overrides:
getSubscriptionNamein classSubscriptionView- Returns:
- name of the durable consumer
-
browse
public CompositeData[] browse() throws OpenDataException
Browse messages for this durable subscriber- Specified by:
browsein interfaceDurableSubscriptionViewMBean- Returns:
- messages
- Throws:
OpenDataException
-
browseAsTable
public TabularData browseAsTable() throws OpenDataException
Browse messages for this durable subscriber- Specified by:
browseAsTablein interfaceDurableSubscriptionViewMBean- Returns:
- messages
- Throws:
OpenDataException
-
destroy
public void destroy() throws ExceptionDestroys the durable subscription so that messages will no longer be stored for this subscription- Specified by:
destroyin interfaceDurableSubscriptionViewMBean- Throws:
Exception
-
toString
public String toString()
- Overrides:
toStringin classSubscriptionView- Returns:
- pretty print
-
cursorSize
public int cursorSize()
- Specified by:
cursorSizein interfaceDurableSubscriptionViewMBean- Returns:
- the number of messages available to be paged in by the cursor
-
removeMessage
public void removeMessage(String messageId) throws Exception
Description copied from interface:DurableSubscriptionViewMBeanRemoves a message from the durable subscription.- Specified by:
removeMessagein interfaceDurableSubscriptionViewMBean- Throws:
Exception
-
doesCursorHaveMessagesBuffered
public boolean doesCursorHaveMessagesBuffered()
- Specified by:
doesCursorHaveMessagesBufferedin interfaceDurableSubscriptionViewMBean- Returns:
- true if the cursor has messages buffered to deliver
-
doesCursorHaveSpace
public boolean doesCursorHaveSpace()
- Specified by:
doesCursorHaveSpacein interfaceDurableSubscriptionViewMBean- Returns:
- true if the message cursor has memory space available to page in more messages
-
getCursorMemoryUsage
public long getCursorMemoryUsage()
- Specified by:
getCursorMemoryUsagein interfaceDurableSubscriptionViewMBean- Returns:
- the cursor memory usage in bytes
-
getCursorPercentUsage
public int getCursorPercentUsage()
- Specified by:
getCursorPercentUsagein interfaceDurableSubscriptionViewMBean- Returns:
- the cursor memory usage as a percentage
-
isCursorFull
public boolean isCursorFull()
- Specified by:
isCursorFullin interfaceDurableSubscriptionViewMBean- Returns:
- true if the cursor has reached its memory limit for paged in messages
-
isActive
public boolean isActive()
- Specified by:
isActivein interfaceSubscriptionViewMBean- Overrides:
isActivein classSubscriptionView- Returns:
- true if the subscriber is active
-
-