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
FieldsModifier and TypeFieldDescriptionprotected ManagedRegionBrokerprotected BrokerServiceprotected DurableTopicSubscriptionprotected StringFields inherited from class org.apache.activemq.broker.jmx.SubscriptionView
clientId, subscription, userName -
Constructor Summary
ConstructorsConstructorDescriptionDurableSubscriptionView(ManagedRegionBroker broker, BrokerService brokerService, String clientId, String userName, Subscription sub) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbrowse()Browse messages for this durable subscriberBrowse messages for this durable subscriberintvoiddestroy()Destroys the durable subscription so that messages will no longer be stored for this subscriptionbooleanbooleanlongintbooleanisActive()booleanvoidremoveMessage(String messageId) Removes a message from the durable subscription.toString()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, setSelectorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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 Details
-
broker
-
brokerService
-
subscriptionName
-
durableSub
-
-
Constructor Details
-
DurableSubscriptionView
public DurableSubscriptionView(ManagedRegionBroker broker, BrokerService brokerService, String clientId, String userName, Subscription sub) Constructor- Parameters:
clientId-sub-
-
-
Method Details
-
getSubscriptionName
- Specified by:
getSubscriptionNamein interfaceDurableSubscriptionViewMBean- Specified by:
getSubscriptionNamein interfaceSubscriptionViewMBean- Overrides:
getSubscriptionNamein classSubscriptionView- Returns:
- name of the durable consumer
-
browse
Browse messages for this durable subscriber- Specified by:
browsein interfaceDurableSubscriptionViewMBean- Returns:
- messages
- Throws:
OpenDataException
-
browseAsTable
Browse messages for this durable subscriber- Specified by:
browseAsTablein interfaceDurableSubscriptionViewMBean- Returns:
- messages
- Throws:
OpenDataException
-
destroy
Destroys the durable subscription so that messages will no longer be stored for this subscription- Specified by:
destroyin interfaceDurableSubscriptionViewMBean- Throws:
Exception
-
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
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
-