KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > mq > server > jmx > Topic


1 /*
2  * JBoss, Home of Professional Open Source
3  * Copyright 2006, Red Hat Middleware LLC, and individual contributors
4  * by the @authors tag. See the copyright.txt in the distribution for a
5  * full listing of individual contributors.
6  *
7  * This is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation; either version 2.1 of
10  * the License, or (at your option) any later version.
11  *
12  * This software is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this software; if not, write to the Free
19  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21  */

22 package org.jboss.mq.server.jmx;
23
24 import java.util.Hashtable JavaDoc;
25 import java.util.List JavaDoc;
26
27 import javax.jms.InvalidSelectorException JavaDoc;
28 import javax.management.MBeanRegistration JavaDoc;
29 import javax.management.MBeanServer JavaDoc;
30 import javax.management.ObjectName JavaDoc;
31
32 import org.w3c.dom.Element JavaDoc;
33
34 /**
35  * Portability class that maps the mbean ops onto the
36  * org.jboss.jms.server.destination.Topic
37  *
38  * @author Scott.Stark@jboss.org
39  * @version $Revision:$
40  */

41 public class Topic
42    implements MBeanRegistration JavaDoc, TopicMBean
43 {
44    private org.jboss.jms.server.destination.Topic delegate;
45
46    public Topic()
47    {
48       delegate = new org.jboss.jms.server.destination.Topic();
49    }
50    public Topic(boolean createProgramatically)
51    {
52       delegate = new org.jboss.jms.server.destination.Topic(createProgramatically);
53    }
54
55    /* (non-Javadoc)
56     * @see org.jboss.mq.server.jmx.TopicMBean#create()
57     */

58    public void create() throws Exception JavaDoc
59    {
60       delegate.create();
61    }
62
63    /* (non-Javadoc)
64     * @see org.jboss.mq.server.jmx.TopicMBean#destroy()
65     */

66    public void destroy()
67    {
68       delegate.destroy();
69    }
70
71    /* (non-Javadoc)
72     * @see org.jboss.mq.server.jmx.TopicMBean#getDownCacheSize()
73     */

74    public int getDownCacheSize()
75    {
76       return delegate.getDownCacheSize();
77    }
78
79    /* (non-Javadoc)
80     * @see org.jboss.mq.server.jmx.TopicMBean#getFullSize()
81     */

82    public int getFullSize()
83    {
84       return delegate.getFullSize();
85    }
86
87    /* (non-Javadoc)
88     * @see org.jboss.mq.server.jmx.TopicMBean#getJNDIName()
89     */

90    public String JavaDoc getJNDIName()
91    {
92       return delegate.getJNDIName();
93    }
94
95    /* (non-Javadoc)
96     * @see org.jboss.mq.server.jmx.TopicMBean#getMessagesFromNonDurableSub(org.jboss.messaging.core.local.Topic, long, java.lang.String)
97     */

98    public List JavaDoc getMessagesFromNonDurableSub(org.jboss.messaging.core.local.Topic arg0,
99          long arg1, String JavaDoc arg2) throws InvalidSelectorException JavaDoc
100    {
101       return delegate.getMessagesFromNonDurableSub(arg0, arg1, arg2);
102    }
103
104    /* (non-Javadoc)
105     * @see org.jboss.mq.server.jmx.TopicMBean#getName()
106     */

107    public String JavaDoc getName()
108    {
109       return delegate.getName();
110    }
111
112    /* (non-Javadoc)
113     * @see org.jboss.mq.server.jmx.TopicMBean#getPageSize()
114     */

115    public int getPageSize()
116    {
117       return delegate.getPageSize();
118    }
119
120    /* (non-Javadoc)
121     * @see org.jboss.mq.server.jmx.TopicMBean#getServer()
122     */

123    public MBeanServer JavaDoc getServer()
124    {
125       return delegate.getServer();
126    }
127
128    /* (non-Javadoc)
129     * @see org.jboss.mq.server.jmx.TopicMBean#getServerPeer()
130     */

131    public ObjectName JavaDoc getServerPeer()
132    {
133       return delegate.getServerPeer();
134    }
135
136    /* (non-Javadoc)
137     * @see org.jboss.mq.server.jmx.TopicMBean#isCreatedProgrammatically()
138     */

139    public boolean isCreatedProgrammatically()
140    {
141       return delegate.isCreatedProgrammatically();
142    }
143
144    /* (non-Javadoc)
145     * @see org.jboss.mq.server.jmx.TopicMBean#listMessagesDurableSub(java.lang.String, java.lang.String, java.lang.String)
146     */

147    public List JavaDoc listMessagesDurableSub(String JavaDoc arg0, String JavaDoc arg1, String JavaDoc arg2) throws Exception JavaDoc
148    {
149       return delegate.listMessagesDurableSub(arg0, arg1, arg2);
150    }
151
152    /* (non-Javadoc)
153     * @see org.jboss.mq.server.jmx.TopicMBean#listMessagesNonDurableSub(long, java.lang.String)
154     */

155    public List JavaDoc listMessagesNonDurableSub(long arg0, String JavaDoc arg1) throws Exception JavaDoc
156    {
157       return delegate.listMessagesNonDurableSub(arg0, arg1);
158    }
159
160    /* (non-Javadoc)
161     * @see org.jboss.mq.server.jmx.TopicMBean#listSubscriptionsAsText()
162     */

163    public String JavaDoc listSubscriptionsAsText() throws Exception JavaDoc
164    {
165       return delegate.listSubscriptionsAsText();
166    }
167
168    /* (non-Javadoc)
169     * @see org.jboss.mq.server.jmx.TopicMBean#listSubscriptionsAsText(boolean)
170     */

171    public String JavaDoc listSubscriptionsAsText(boolean arg0) throws Exception JavaDoc
172    {
173       return delegate.listSubscriptionsAsText(arg0);
174    }
175
176    /* (non-Javadoc)
177     * @see org.jboss.mq.server.jmx.TopicMBean#removeAllMessages()
178     */

179    public void removeAllMessages() throws Exception JavaDoc
180    {
181       delegate.removeAllMessages();
182    }
183
184    /* (non-Javadoc)
185     * @see org.jboss.mq.server.jmx.TopicMBean#setDownCacheSize(int)
186     */

187    public void setDownCacheSize(int arg0)
188    {
189       delegate.setDownCacheSize(arg0);
190    }
191
192    /* (non-Javadoc)
193     * @see org.jboss.mq.server.jmx.TopicMBean#setFullSize(int)
194     */

195    public void setFullSize(int arg0)
196    {
197       delegate.setFullSize(arg0);
198    }
199
200    /* (non-Javadoc)
201     * @see org.jboss.mq.server.jmx.TopicMBean#setJNDIName(java.lang.String)
202     */

203    public void setJNDIName(String JavaDoc arg0)
204    {
205       delegate.setJNDIName(arg0);
206    }
207
208    /* (non-Javadoc)
209     * @see org.jboss.mq.server.jmx.TopicMBean#setPageSize(int)
210     */

211    public void setPageSize(int arg0)
212    {
213       delegate.setPageSize(arg0);
214    }
215
216    /* (non-Javadoc)
217     * @see org.jboss.mq.server.jmx.TopicMBean#setSecurityConfig(org.w3c.dom.Element)
218     */

219    public void setSecurityConfig(Element JavaDoc arg0) throws Exception JavaDoc
220    {
221       delegate.setSecurityConfig(arg0);
222    }
223    /* (non-Javadoc)
224     * @see org.jboss.mq.server.jmx.TopicMBean#setSecurityConf(org.w3c.dom.Element)
225     */

226    public void setSecurityConf(Element JavaDoc arg0) throws Exception JavaDoc
227    {
228       delegate.setSecurityConfig(arg0);
229    }
230
231    /* (non-Javadoc)
232     * @see org.jboss.mq.server.jmx.TopicMBean#setSecurityManager(javax.management.ObjectName)
233     */

234    public void setSecurityManager(ObjectName JavaDoc arg0)
235    {
236       // noop
237
}
238
239    /* (non-Javadoc)
240     * @see org.jboss.mq.server.jmx.TopicMBean#setServerPeer(javax.management.ObjectName)
241     */

242    public void setServerPeer(ObjectName JavaDoc arg0)
243    {
244       delegate.setServerPeer(arg0);
245    }
246    /* (non-Javadoc)
247     * @see org.jboss.mq.server.jmx.TopicMBean#setDestinationManager(javax.management.ObjectName)
248     */

249    public void setDestinationManager(ObjectName JavaDoc arg0) throws Exception JavaDoc
250    {
251       ObjectName JavaDoc peer = new ObjectName JavaDoc("jboss.messaging:service=ServerPeer");
252       delegate.setServerPeer(peer);
253    }
254
255    /* (non-Javadoc)
256     * @see org.jboss.mq.server.jmx.TopicMBean#start()
257     */

258    public void start() throws Exception JavaDoc
259    {
260       delegate.start();
261    }
262
263    /* (non-Javadoc)
264     * @see org.jboss.mq.server.jmx.TopicMBean#stop()
265     */

266    public void stop()
267    {
268       delegate.stop();
269    }
270
271    /* (non-Javadoc)
272     * @see org.jboss.mq.server.jmx.TopicMBean#subscriptionCount()
273     */

274    public int subscriptionCount() throws Exception JavaDoc
275    {
276       return delegate.subscriptionCount();
277    }
278
279    /* (non-Javadoc)
280     * @see org.jboss.mq.server.jmx.TopicMBean#subscriptionCount(boolean)
281     */

282    public int subscriptionCount(boolean arg0) throws Exception JavaDoc
283    {
284       return delegate.subscriptionCount(arg0);
285    }
286
287    public ObjectName JavaDoc getExpiryDestination()
288    {
289       return null;
290    }
291    public void setExpiryDestination(ObjectName JavaDoc destination)
292    {
293       System.err.println("There is no ExpiryDestination currently");
294    }
295
296    public String JavaDoc toString()
297    {
298       return delegate.toString();
299    }
300
301    public void postDeregister()
302    {
303       delegate.postDeregister();
304    }
305    public void postRegister(Boolean JavaDoc registrationDone)
306    {
307       delegate.postRegister(registrationDone);
308    }
309    public void preDeregister() throws Exception JavaDoc
310    {
311       delegate.preDeregister();
312    }
313    public ObjectName JavaDoc preRegister(MBeanServer JavaDoc server, ObjectName JavaDoc name)
314       throws Exception JavaDoc
315    {
316       return delegate.preRegister(server, name);
317    }
318 }
319
Popular Tags