View Javadoc
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 2000-2004 (C) Exoffice Technologies Inc. All Rights Reserved. 42 * 43 * $Id: JmsAdminServerIfc.java,v 1.9 2004/01/02 07:32:09 tanderson Exp $ 44 * 45 * Date Author Changes 46 * 05/10/2000 jima Created 47 */ 48 package org.exolab.jms.administration; 49 50 import java.util.Vector; 51 52 import javax.jms.JMSException; 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.9 $ $Date: 2004/01/02 07:32:09 $ 61 * @author <a href="mailto:jima@exoffice.com">Jim Alateras</a> 62 */ 63 public interface JmsAdminServerIfc { 64 65 /*** 66 * Return the number of outstanding messages for a particular destination. 67 * 68 * @param topic name of the topic 69 * @param name durable consumer name 70 * @return int message count 71 * @exception JMSException 72 */ 73 public int getDurableConsumerMessageCount(String topic, String name) 74 throws JMSException; 75 76 /*** 77 * Return the number of outstanding messages for a particular queue. 78 * 79 * @param queue the queue name 80 * @return int message count 81 * @exception JMSException 82 */ 83 public int getQueueMessageCount(String queue) 84 throws JMSException; 85 86 /*** 87 * Add a durable consumer for the specified name the passed in name 88 * 89 * @param topic name of the destination 90 * @param name name of the consumer 91 * @return boolean true if successful 92 * @exception JMSException 93 */ 94 public boolean addDurableConsumer(String topic, String name) 95 throws JMSException; 96 97 /*** 98 * Remove the the specified durable consumer 99 * 100 * @param name name of the consumer 101 * @return boolean true if successful 102 * @exception JMSException 103 */ 104 public boolean removeDurableConsumer(String name) 105 throws JMSException; 106 107 /*** 108 * Check if the specified durable consumer exists 109 * 110 * @param name durable consumer to query 111 * @return boolean true if it exists 112 * @exception JMSException 113 */ 114 public boolean durableConsumerExists(String name) 115 throws JMSException; 116 117 /*** 118 * Return the collection of durable consumer names for a particular 119 * topic destination. 120 * 121 * @param topic the topic name 122 * @return Vector collection of strings 123 * @exception JMSException 124 */ 125 public Vector getDurableConsumers(String destination) 126 throws JMSException; 127 128 /*** 129 * De-Activate an active persistent consumer. 130 * 131 * @param name name of the consumer 132 * @return boolean true if successful 133 * @exception JMSException 134 */ 135 public boolean unregisterConsumer(String name) 136 throws JMSException; 137 138 /*** 139 * Check to see if the given consumer is currently connected to the 140 * OpenJMSServer. This is only valid when in online mode. 141 * 142 * @param name The name of the onsumer. 143 * @return boolean True if the consumer is connected. 144 * @exception JMSException 145 * 146 */ 147 public boolean isConnected(String name) 148 throws JMSException; 149 150 /*** 151 * Return a list of all registered destinations. 152 * 153 * @return a collection of <code>javax.jms.Destination</code> instances 154 * @exception JMSException 155 */ 156 public Vector getAllDestinations() 157 throws JMSException; 158 159 /*** 160 * Add a specific destination with the specified name 161 * 162 * @param name destination name 163 * @param queue whether it is queue or a topic 164 * @return boolean true if successful 165 * @exception JMSException 166 */ 167 public boolean addDestination(String destination, Boolean queue) 168 throws JMSException; 169 170 /*** 171 * Destroy the specified destination and all associated messsages and 172 * consumers. This is a very dangerous operation to execute while there 173 * are clients online 174 * 175 * @param destination destination to destroy 176 * @exception JMSException 177 */ 178 public boolean removeDestination(String name) 179 throws JMSException; 180 181 /*** 182 * Determine if the specified destination exists 183 * 184 * @param name - the destination to check 185 * @return boolean - true if it exists 186 * @throws JMSException 187 */ 188 public boolean destinationExists(String name) 189 throws JMSException; 190 191 /*** 192 * Terminate the JMS Server. If it is running as a standalone application 193 * then exit the application. It is running as an embedded application then 194 * just terminate the thread 195 */ 196 public void stopServer() 197 throws JMSException; 198 199 /*** 200 * Purge all processed messages from the database 201 * 202 * @return int number of purged messages 203 * @exception JMSException 204 */ 205 public int purgeMessages() 206 throws JMSException; 207 208 /*** 209 * Close the connection. 210 */ 211 public void close(); 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 */ 221 public boolean addUser(String username, String password) 222 throws JMSException; 223 224 /*** 225 * Change password for the specified user 226 * 227 * @param username the users name 228 * @param password the users password 229 * @return <code>true</code> if the password is changed 230 * otherwise <code>false</code> 231 */ 232 public boolean changePassword(String username, String password) 233 throws JMSException; 234 235 /*** 236 * Remove the specified user 237 * 238 * @param username the users name 239 * @return <code>true</code> if the user is removed 240 * otherwise <code>false</code> 241 */ 242 public boolean removeUser(String username) 243 throws JMSException; 244 245 /*** 246 * Return a list of all registered users. 247 * 248 * @return Vector of users 249 * @exception JMSException 250 */ 251 public Vector getAllUsers() 252 throws JMSException; 253 }

This page was automatically generated by Maven