KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_jms > api > JmsAdministration


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: JmsAdministration.java,v 1.9 2004/03/19 14:31:53 sauthieg Exp $
23  * --------------------------------------------------------------------------
24  */

25
26
27 package org.objectweb.jonas_jms.api;
28
29 import javax.jms.Queue JavaDoc;
30 import javax.jms.Topic JavaDoc;
31 import javax.jms.XAConnectionFactory JavaDoc;
32 import javax.jms.XAQueueConnectionFactory JavaDoc;
33 import javax.jms.XATopicConnectionFactory JavaDoc;
34
35
36 /**
37  * JMS Administration interface.
38  * must be implemented for each jms provider
39  * JOnAS uses this interface to access the JMS provider.
40  * @author Philippe Coq
41  * Contributor(s):
42  * Jeff Mesnil: for JORAM 3.0 integration
43  * Frederic Maistre: for JORAM 3.4 (JMS 1.1) integration
44  * 03/05/25 : Adriana Danes : add JMS resource monitoring
45  */

46 public interface JmsAdministration {
47
48     /**
49      * Jms Administrator is created with newInstance().
50      * initialization is done later with this method.
51      * The MOM will be started if collocated.
52      * This method should create an XAConnectionFactory,
53      * a XATopicConnectionFactory and a XAQueueConnectionFactory
54      * @param boolean true for if the MOM in run in the current JVM
55      * @param String url connexion that must be used.
56      */

57     public void start(boolean collocated, String JavaDoc url) throws Exception JavaDoc;
58
59     /**
60      * Stop the Jms Administrator
61      */

62     public void stop();
63
64     /**
65      * Get the XAConnectionFactory
66      */

67     public XAConnectionFactory JavaDoc getXAConnectionFactory();
68
69     /**
70      * Get the XATopicConnectionFactory
71      */

72     public XATopicConnectionFactory JavaDoc getXATopicConnectionFactory();
73
74     /**
75      * Get the XAQueueConnectionFactory
76      */

77     public XAQueueConnectionFactory JavaDoc getXAQueueConnectionFactory();
78
79     /**
80      * Create a Topic
81      */

82     public Topic JavaDoc createTopic(String JavaDoc name) throws Exception JavaDoc;
83
84     /**
85      * Create a Queue
86      */

87     public Queue JavaDoc createQueue(String JavaDoc name) throws Exception JavaDoc;
88
89     /**
90      * Delete a destination.
91      */

92     public void deleteDestination(String JavaDoc name) throws Exception JavaDoc;
93
94     /**
95      * Get number of pending messages on a queue
96      */

97     public int getPendingMessages(javax.jms.Queue JavaDoc queue) throws Exception JavaDoc;
98
99     /**
100      * Get number of pending requests on a queue
101      */

102     public int getPendingRequests(javax.jms.Queue JavaDoc queue) throws Exception JavaDoc;
103
104     /**
105      * Get number of subscriptions on a topic
106      */

107     public int getSubscriptions(javax.jms.Topic JavaDoc topic) throws Exception JavaDoc;
108 }
109
Popular Tags