1 /***
2 * Redistribution and use of this software and associated documentation
3 * ("Software"), with or without modification, are permitted provided
4 * that the following conditions are met:
5 *
6 * 1. Redistributions of source code must retain copyright
7 * statements and notices. Redistributions must also contain a
8 * copy of this document.
9 *
10 * 2. Redistributions in binary form must reproduce the
11 * above copyright notice, this list of conditions and the
12 * following disclaimer in the documentation and/or other
13 * materials provided with the distribution.
14 *
15 * 3. The name "Exolab" must not be used to endorse or promote
16 * products derived from this Software without prior written
17 * permission of Exoffice Technologies. For written permission,
18 * please contact info@exolab.org.
19 *
20 * 4. Products derived from this Software may not be called "Exolab"
21 * nor may "Exolab" appear in their names without prior written
22 * permission of Exoffice Technologies. Exolab is a registered
23 * trademark of Exoffice Technologies.
24 *
25 * 5. Due credit should be given to the Exolab Project
26 * (http://www.exolab.org/).
27 *
28 * THIS SOFTWARE IS PROVIDED BY EXOFFICE TECHNOLOGIES AND CONTRIBUTORS
29 * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
30 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
31 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
32 * EXOFFICE TECHNOLOGIES OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
33 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
34 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
35 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
37 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
39 * OF THE POSSIBILITY OF SUCH DAMAGE.
40 *
41 * Copyright 1999 (C) Exoffice Technologies Inc. All Rights Reserved.
42 *
43 * $Id: RemoteJmsAdminConnectionIfc.java,v 1.2 2003/08/07 13:33:09 tanderson Exp $
44 *
45 * Date Author Changes
46 * 05/10/2000 jima Created
47 */
48 package org.exolab.jms.server.rmi;
49
50 import java.rmi.Remote;
51 import java.rmi.RemoteException;
52 import java.util.Vector;
53
54
55 /***
56 * This specifies all the administration methods that can be used to control
57 * the JMS server through an RMI connector. The control logic is all at the
58 * org.exolab.jms.server package level
59 *
60 * @version $Revision: 1.2 $ $Date: 2003/08/07 13:33:09 $
61 * @author <a href="mailto:jima@exoffice.com">Jim Alateras</a>
62 * @see java.rmi.Remote
63 **/
64 public interface RemoteJmsAdminConnectionIfc extends Remote {
65
66 /***
67 * Add a consumer for the specified topic
68 *
69 * @param topic name of the destination
70 * @param name name of the consumer
71 * @return boolean true if successful
72 * @throws RemoteException if the connection cannot be created
73 */
74 boolean addDurableConsumer(String topic, String name)
75 throws RemoteException;
76
77 /***
78 * Remove the consumer attached to the specified destination and with
79 * the passed in name
80 *
81 * @param name name of the consumer
82 * @return boolean true if successful
83 * @throws RemoteException if the connection cannot be created
84 */
85 boolean removeDurableConsumer(String name)
86 throws RemoteException;
87
88 /***
89 * Check if a durable consumer, with the specified name, already exists
90 *
91 * @param name name of the consumer
92 * @return boolean true if it exists
93 * @throws RemoteException if the connection cannot be created
94 */
95 boolean durableConsumerExists(String name)
96 throws RemoteException;
97
98 /***
99 * Return the collection of durable consumer names for a particular
100 * topic destination.
101 *
102 * @param destination the destination name
103 * @return Vector collection of strings
104 * @throws RemoteException if the connection cannot be created
105 */
106 Vector getDurableConsumers(String destination)
107 throws RemoteException;
108
109 /***
110 * De-Activate an active persistent consumer.
111 *
112 * @param name name of the consumer
113 * @return boolean true if successful
114 * @throws RemoteException if the connection cannot be created
115 */
116 boolean unregisterConsumer(String name)
117 throws RemoteException;
118
119 /***
120 * Check to see if the given consumer is currently connected to the
121 * OpenJMSServer. This is only valid when in online mode.
122 *
123 * @param name The name of the onsumer.
124 * @return boolean True if the consumer is connected.
125 * @throws RemoteException if the connection cannot be created
126 *
127 */
128 boolean isConnected(String name)
129 throws RemoteException;
130
131 /***
132 * Add a specific destination with the specified name
133 *
134 * @param destination destination name
135 * @param queue whether it is queue or a topic
136 * @return boolean true if successful
137 * @throws RemoteException if the connection cannot be created
138 */
139 boolean addDestination(String destination, Boolean queue)
140 throws RemoteException;
141
142 /***
143 * Destroy the specified destination and all associated messsages and
144 * consumers. This is a very dangerous operation to execute while there
145 * are clients online
146 *
147 * @param name destination to destroy
148 * @return boolean if the destination got destroyed
149 * @throws RemoteException if the connection cannot be created
150 */
151 boolean removeDestination(String name)
152 throws RemoteException;
153
154 /***
155 * Determine whether the destination with the specified name exists
156 *
157 * @param name - the destination to check
158 * @return boolean - if the destination exists
159 * @throws RemoteException if the connection cannot be created
160 */
161 boolean destinationExists(String name)
162 throws RemoteException;
163
164 /***
165 * Return a list of all registered destinations.
166 *
167 * @return Vector collection of strings
168 * @throws RemoteException if the connection cannot be created
169 */
170 Vector getAllDestinations()
171 throws RemoteException;
172
173 /***
174 * Return the number of outstanding messages for a particular destination.
175 *
176 * @param topic name of the topic
177 * @param name durable consumer name
178 * @return int message count
179 * @throws RemoteException if the connection cannot be created
180 */
181 int getDurableConsumerMessageCount(String topic, String name)
182 throws RemoteException;
183
184 /***
185 * Return the number of outstanding messages for a particular queue.
186 *
187 * @param queue the queue name
188 * @return int message count
189 * @throws RemoteException if the connection cannot be created
190 */
191 int getQueueMessageCount(String queue)
192 throws RemoteException;
193
194 /***
195 * Purge all processed messages from the database
196 *
197 * @return int the number of purged messages
198 * @throws RemoteException if the connection cannot be created
199 */
200 int purgeMessages()
201 throws RemoteException;
202
203 /***
204 * Terminate the JMS Server. If it is running as a standalone application
205 * then exit the application. It is running as an embedded application then
206 * just terminate the thread
207 * @throws RemoteException if the connection cannot be created
208 */
209 void stopServer()
210 throws RemoteException;
211
212
213 /***
214 * Add a user with the specified name
215 *
216 * @param username the users name
217 * @param password the users password
218 * @return <code>true</code> if the user is added
219 * otherwise <code>false</code>
220 * @throws RemoteException if the connection cannot be created
221 */
222 boolean addUser(String username, String password)
223 throws RemoteException;
224
225 /***
226 * Change password for the specified user
227 *
228 * @param username the users name
229 * @param password the users password
230 * @return <code>true</code> if the password is changed
231 * otherwise <code>false</code>
232 * @throws RemoteException if the connection cannot be created
233 */
234 boolean changePassword(String username, String password)
235 throws RemoteException;
236
237 /***
238 * Remove the specified user
239 *
240 * @param username the users name
241 * @return <code>true</code> if the user is removed
242 * otherwise <code>false</code>
243 * @throws RemoteException if the connection cannot be created
244 */
245 boolean removeUser(String username)
246 throws RemoteException;
247
248 /***
249 * Return a list of all registered users.
250 *
251 * @return Vector of users
252 * @throws RemoteException if the connection cannot be created
253 */
254 Vector getAllUsers()
255 throws RemoteException;
256
257 }
258
259
260
This page was automatically generated by Maven