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 2003 (C) Exoffice Technologies Inc. All Rights Reserved.
42 *
43 * $Id: AdminConnection.java,v 1.12 2003/08/07 13:32:46 tanderson Exp $
44 */
45 package org.exolab.jms.administration;
46
47 import java.util.Vector;
48
49 import javax.jms.JMSException;
50
51
52 /***
53 * This specifies all the administration methods that can be used to control
54 * the JMS server. The control logic is all at the org.exolab.jms.server
55 * package level.
56 *
57 * @version $Revision: 1.12 $ $Date: 2003/08/07 13:32:46 $
58 * @author <a href="mailto:knut@lerpold.no">Knut Lerpold</a>
59 */
60 public interface AdminConnection {
61
62 /***
63 * Add a durable consumer for the specified name
64 *
65 * @param topic name of the destination
66 * @param name name of the consumer
67 * @return boolean true if successful
68 * @throws JMSException
69 */
70 boolean addDurableConsumer(String topic, String name) throws JMSException;
71
72 /***
73 * Check if the specified durable consumer exists
74 *
75 * @param name durable consumer to query
76 * @return boolean true if it exists
77 * @throws JMSException
78 */
79 boolean durableConsumerExists(String name) throws JMSException;
80
81 /***
82 * Remove the specified durable consumer
83 *
84 * @param name name of the consumer
85 * @return boolean true if successful
86 * @throws JMSException
87 */
88 boolean removeDurableConsumer(String name) throws JMSException;
89
90 /***
91 * Check to see if the given consumer is currently connected
92 *
93 * @param name the name of the onsumer.
94 * @return <code>true</code> if the consumer is connected
95 * @throws JMSException
96 */
97 boolean isConnected(String name) throws JMSException;
98
99 /***
100 * De-activate an active persistent consumer.
101 *
102 * @param name name of the consumer
103 * @return boolean true if successful
104 * @throws JMSException
105 */
106 boolean unregisterConsumer(String name) throws JMSException;
107
108 /***
109 * Add a specific destination with the specified name
110 *
111 * @param name destination name
112 * @param queue whether it is queue or a topic
113 * @return boolean true if successful
114 * @throws JMSException
115 */
116 boolean addDestination(String destination, Boolean queue)
117 throws JMSException;
118
119 /***
120 * Destroy the specified destination and all associated messsages and
121 * consumers. This is a very dangerous operation to execute while there
122 * are clients online
123 *
124 * @param destination destination to destroy
125 * @throws JMSException
126 */
127 boolean removeDestination(String name) throws JMSException;
128
129 /***
130 * Determine if the specified destination exists
131 *
132 * @param name - the destination to check
133 * @return boolean - true if it exists
134 * @throws JMSException
135 */
136 boolean destinationExists(String name) throws JMSException;
137
138 /***
139 * Terminate the JMS Server. If it is running as a standalone application
140 * then exit the application. It is running as an embedded application then
141 * just terminate the thread
142 *
143 * @throws JMSException
144 */
145 void stopServer() throws JMSException;
146
147 /***
148 * Purge all processed messages from the database
149 *
150 * @return the number of purged messages
151 * @throws JMSException
152 */
153 int purgeMessages() throws JMSException;
154
155 /***
156 * Add a user with the specified name
157 *
158 * @param username the users name
159 * @param password the users password
160 * @return <code>true</code> if the user is added
161 * otherwise <code>false</code>
162 * @throws JMSException
163 */
164 boolean addUser(String username, String password) throws JMSException;
165
166 /***
167 * Change password for the specified user
168 *
169 * @param username the users name
170 * @param password the users password
171 * @return <code>true</code> if the password is changed
172 * otherwise <code>false</code>
173 * @throws JMSException
174 */
175 boolean changePassword(String username, String password)
176 throws JMSException;
177
178 /***
179 * Remove the specified user
180 *
181 * @param username the users name
182 * @return <code>true</code> if the user is removed otherwise
183 * <code>false</code>
184 * @throws JMSException
185 */
186 boolean removeUser(String username) throws JMSException;
187
188 /***
189 * Return the number of outstanding messages for a particular destination.
190 *
191 * @param topic name of the topic
192 * @param name durable consumer name
193 * @return int message count
194 * @throws JMSException on error
195 */
196 int getDurableConsumerMessageCount(String topic, String name)
197 throws JMSException;
198
199 /***
200 * Return the number of outstanding messages for a particular queue.
201 *
202 * @param queue the queue name
203 * @return int message count
204 * @throws JMSException on error
205 */
206 int getQueueMessageCount(String queue) throws JMSException;
207
208 /***
209 * Return the collection of durable consumer names for a particular
210 * topic destination.
211 *
212 * @param destination the destination name
213 * @return Vector collection of strings
214 * @throws JMSException on error
215 */
216 Vector getDurableConsumers(String destination) throws JMSException;
217
218 /***
219 * Return a list of all registered destinations.
220 *
221 * @return Vector collection of strings
222 * @throws JMSException on error
223 */
224 Vector getAllDestinations() throws JMSException;
225
226 /***
227 * Return a list of all registered users.
228 *
229 * @return Vector of users
230 * @throws JMSException on error
231 */
232 Vector getAllUsers() throws JMSException;
233
234 }
This page was automatically generated by Maven