Package org.apache.activemq.broker.jmx
Class InactiveDurableSubscriptionView
- java.lang.Object
-
- org.apache.activemq.broker.jmx.SubscriptionView
-
- org.apache.activemq.broker.jmx.DurableSubscriptionView
-
- org.apache.activemq.broker.jmx.InactiveDurableSubscriptionView
-
- All Implemented Interfaces:
DurableSubscriptionViewMBean
,SubscriptionViewMBean
public class InactiveDurableSubscriptionView extends DurableSubscriptionView implements DurableSubscriptionViewMBean
-
-
Field Summary
Fields Modifier and Type Field Description protected SubscriptionInfo
subscriptionInfo
-
Fields inherited from class org.apache.activemq.broker.jmx.DurableSubscriptionView
broker, brokerService, durableSub, subscriptionName
-
Fields inherited from class org.apache.activemq.broker.jmx.SubscriptionView
clientId, subscription, userName
-
-
Constructor Summary
Constructors Constructor Description InactiveDurableSubscriptionView(ManagedRegionBroker broker, BrokerService brokerService, String clientId, SubscriptionInfo subInfo, Subscription subscription)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositeData[]
browse()
Browse messages for this durable subscriberTabularData
browseAsTable()
Browse messages for this durable subscribervoid
destroy()
Destroys the durable subscription so that messages will no longer be stored for this subscriptionprotected ConsumerInfo
getConsumerInfo()
String
getDestinationName()
String
getSelector()
long
getSubscriptionId()
String
getSubscriptionName()
boolean
isActive()
boolean
isDestinationQueue()
boolean
isDestinationTemporary()
boolean
isDestinationTopic()
void
removeMessage(String messageId)
Removes a message from the durable subscription.String
toString()
-
Methods inherited from class org.apache.activemq.broker.jmx.DurableSubscriptionView
cursorSize, doesCursorHaveMessagesBuffered, doesCursorHaveSpace, getCursorMemoryUsage, getCursorPercentUsage, isCursorFull
-
Methods inherited from class org.apache.activemq.broker.jmx.SubscriptionView
gc, getClientId, getConnection, getConnectionId, getConsumedCount, getDequeueCounter, getDispatchedCounter, getDispatchedQueueSize, getEnqueueCounter, getMaximumPendingMessageLimit, getMessageCountAwaitingAcknowledge, getPendingQueueSize, getPrefetchSize, getPriority, getSessionId, getUserName, 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.DurableSubscriptionViewMBean
cursorSize, doesCursorHaveMessagesBuffered, doesCursorHaveSpace, getCursorMemoryUsage, getCursorPercentUsage, isCursorFull
-
Methods inherited from interface org.apache.activemq.broker.jmx.SubscriptionViewMBean
getClientId, getConnection, getConnectionId, getConsumedCount, getDequeueCounter, getDispatchedCounter, getDispatchedQueueSize, getEnqueueCounter, getMaximumPendingMessageLimit, getMessageCountAwaitingAcknowledge, getPendingQueueSize, getPrefetchSize, getPriority, getSessionId, getUserName, isDispatchAsync, isDurable, isExclusive, isMatchingQueue, isMatchingTopic, isNetwork, isNoLocal, isRetroactive, isSlowConsumer, resetStatistics, setSelector
-
-
-
-
Field Detail
-
subscriptionInfo
protected SubscriptionInfo subscriptionInfo
-
-
Constructor Detail
-
InactiveDurableSubscriptionView
public InactiveDurableSubscriptionView(ManagedRegionBroker broker, BrokerService brokerService, String clientId, SubscriptionInfo subInfo, Subscription subscription)
Constructor- Parameters:
broker
-brokerService
-clientId
-subInfo
-subscription
-
-
-
Method Detail
-
getSubscriptionId
public long getSubscriptionId()
- Specified by:
getSubscriptionId
in interfaceSubscriptionViewMBean
- Overrides:
getSubscriptionId
in classSubscriptionView
- Returns:
- the id of the Subscription
-
getDestinationName
public String getDestinationName()
- Specified by:
getDestinationName
in interfaceSubscriptionViewMBean
- Overrides:
getDestinationName
in classSubscriptionView
- Returns:
- the destination name
-
isDestinationQueue
public boolean isDestinationQueue()
- Specified by:
isDestinationQueue
in interfaceSubscriptionViewMBean
- Overrides:
isDestinationQueue
in classSubscriptionView
- Returns:
- true if the destination is a Queue
-
isDestinationTopic
public boolean isDestinationTopic()
- Specified by:
isDestinationTopic
in interfaceSubscriptionViewMBean
- Overrides:
isDestinationTopic
in classSubscriptionView
- Returns:
- true of the destination is a Topic
-
isDestinationTemporary
public boolean isDestinationTemporary()
- Specified by:
isDestinationTemporary
in interfaceSubscriptionViewMBean
- Overrides:
isDestinationTemporary
in classSubscriptionView
- Returns:
- true if the destination is temporary
-
getSubscriptionName
public String getSubscriptionName()
- Specified by:
getSubscriptionName
in interfaceDurableSubscriptionViewMBean
- Specified by:
getSubscriptionName
in interfaceSubscriptionViewMBean
- Overrides:
getSubscriptionName
in classDurableSubscriptionView
- Returns:
- name of the durable consumer
-
isActive
public boolean isActive()
- Specified by:
isActive
in interfaceSubscriptionViewMBean
- Overrides:
isActive
in classDurableSubscriptionView
- Returns:
- true if the subscriber is active
-
getConsumerInfo
protected ConsumerInfo getConsumerInfo()
- Overrides:
getConsumerInfo
in classSubscriptionView
-
browse
public CompositeData[] browse() throws OpenDataException
Browse messages for this durable subscriber- Specified by:
browse
in interfaceDurableSubscriptionViewMBean
- Overrides:
browse
in classDurableSubscriptionView
- Returns:
- messages
- Throws:
OpenDataException
-
browseAsTable
public TabularData browseAsTable() throws OpenDataException
Browse messages for this durable subscriber- Specified by:
browseAsTable
in interfaceDurableSubscriptionViewMBean
- Overrides:
browseAsTable
in classDurableSubscriptionView
- 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 interfaceDurableSubscriptionViewMBean
- Overrides:
destroy
in classDurableSubscriptionView
- Throws:
Exception
-
toString
public String toString()
- Overrides:
toString
in classDurableSubscriptionView
- Returns:
- pretty print
-
getSelector
public String getSelector()
- Specified by:
getSelector
in interfaceSubscriptionViewMBean
- Overrides:
getSelector
in classSubscriptionView
- Returns:
- the JMS selector on the current subscription
-
removeMessage
public void removeMessage(String messageId) throws Exception
Description copied from interface:DurableSubscriptionViewMBean
Removes a message from the durable subscription.- Specified by:
removeMessage
in interfaceDurableSubscriptionViewMBean
- Overrides:
removeMessage
in classDurableSubscriptionView
- Throws:
Exception
-
-