KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > activemq > broker > jmx > SubscriptionViewMBean


1 /**
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one or more
4  * contributor license agreements. See the NOTICE file distributed with
5  * this work for additional information regarding copyright ownership.
6  * The ASF licenses this file to You under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with
8  * the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18 package org.apache.activemq.broker.jmx;
19
20 import javax.jms.InvalidSelectorException JavaDoc;
21
22 /**
23  * @version $Revision: 1.5 $
24  */

25 public interface SubscriptionViewMBean {
26
27     /**
28      * @return the clientId of the Connection the Subscription is on
29      */

30     public String JavaDoc getClientId();
31
32     /**
33      * @return the id of the Connection the Subscription is on
34      */

35     public String JavaDoc getConnectionId();
36
37     /**
38      * @return the id of the Session the subscription is on
39      */

40     public long getSessionId();
41
42     /**
43      * @return the id of the Subscription
44      */

45     public long getSubcriptionId();
46
47     /**
48      * @return the destination name
49      */

50     public String JavaDoc getDestinationName();
51
52     /**
53      * @return the JMS selector on the current subscription
54      */

55     public String JavaDoc getSelector();
56
57     /**
58      * Attempts to change the current active selector on the subscription. This
59      * operation is not supported for persistent topics.
60      */

61     public void setSelector(String JavaDoc selector) throws InvalidSelectorException JavaDoc, UnsupportedOperationException JavaDoc;
62
63     /**
64      * @return true if the destination is a Queue
65      */

66     public boolean isDestinationQueue();
67
68     /**
69      * @return true of the destination is a Topic
70      */

71     public boolean isDestinationTopic();
72
73     /**
74      * @return true if the destination is temporary
75      */

76     public boolean isDestinationTemporary();
77
78     /**
79      * @return true if the subscriber is active
80      */

81     public boolean isActive();
82
83     /**
84      * @return number of messages pending delivery
85      */

86     public int getPendingQueueSize();
87
88     /**
89      * @return number of messages dispatched
90      */

91     public int getDispatchedQueueSize();
92
93     /**
94      * @return number of messages that matched the subscription
95      */

96     long getDispachedCounter();
97
98     /**
99      * @return number of messages that matched the subscription
100      */

101     long getEnqueueCounter();
102
103     /**
104      * @return number of messages queued by the client
105      */

106     long getDequeueCounter();
107
108     /**
109      * @return the prefetch that has been configured for this subscriber
110      */

111     public int getPrefetchSize();
112
113     /**
114      * @return whether or not the subscriber is retroactive or not
115      */

116     public boolean isRetroactive();
117
118     /**
119      * @return whether or not the subscriber is an exclusive consumer
120      */

121     public boolean isExclusive();
122
123     /**
124      * @return whether or not the subscriber is durable (persistent)
125      */

126     public boolean isDurable();
127
128     /**
129      * @return whether or not the subscriber ignores local messages
130      */

131     public boolean isNoLocal();
132
133     /**
134      * @return the maximum number of pending messages allowed in addition to the
135      * prefetch size. If enabled to a non-zero value then this will
136      * perform eviction of messages for slow consumers on non-durable
137      * topics.
138      */

139     public int getMaximumPendingMessageLimit();
140
141     /**
142      * @return the consumer priority
143      */

144     public byte getPriority();
145
146     /**
147      * @return the name of the consumer which is only used for durable
148      * consumers.
149      */

150     public String JavaDoc getSubcriptionName();
151 }
152
Popular Tags