org.exolab.jms.administration
Interface AdminConnection

All Known Implementing Classes:
JmsAdminConnectionImpl

public interface AdminConnection

This specifies all the administration methods that can be used to control the JMS server. The control logic is all at the org.exolab.jms.server package level.

Version:
$Revision: 1.1 $ $Date: 2004/11/26 01:50:38 $
Author:
Knut Lerpold

Method Summary
 boolean addDestination(java.lang.String destination, java.lang.Boolean queue)
          Add a specific destination with the specified name
 boolean addDurableConsumer(java.lang.String topic, java.lang.String name)
          Add a durable consumer for the specified name
 boolean addUser(java.lang.String username, java.lang.String password)
          Add a user with the specified name
 boolean changePassword(java.lang.String username, java.lang.String password)
          Change password for the specified user
 boolean destinationExists(java.lang.String name)
          Determine if the specified destination exists
 boolean durableConsumerExists(java.lang.String name)
          Check if the specified durable consumer exists
 java.util.Vector getAllDestinations()
          Return a list of all registered destinations.
 java.util.Vector getAllUsers()
          Return a list of all registered users.
 int getDurableConsumerMessageCount(java.lang.String topic, java.lang.String name)
          Return the number of outstanding messages for a particular destination.
 java.util.Vector getDurableConsumers(java.lang.String destination)
          Return the collection of durable consumer names for a particular topic destination.
 int getQueueMessageCount(java.lang.String queue)
          Return the number of outstanding messages for a particular queue.
 boolean isConnected(java.lang.String name)
          Check to see if the given consumer is currently connected
 int purgeMessages()
          Purge all processed messages from the database
 boolean removeDestination(java.lang.String name)
          Destroy the specified destination and all associated messsages and consumers.
 boolean removeDurableConsumer(java.lang.String name)
          Remove the specified durable consumer
 boolean removeUser(java.lang.String username)
          Remove the specified user
 void stopServer()
          Terminate the JMS Server.
 boolean unregisterConsumer(java.lang.String name)
          De-activate an active persistent consumer.
 

Method Detail

addDurableConsumer

public boolean addDurableConsumer(java.lang.String topic,
                                  java.lang.String name)
                           throws javax.jms.JMSException
Add a durable consumer for the specified name
Parameters:
topic - name of the destination
name - name of the consumer
Returns:
boolean true if successful
Throws:
javax.jms.JMSException -  

durableConsumerExists

public boolean durableConsumerExists(java.lang.String name)
                              throws javax.jms.JMSException
Check if the specified durable consumer exists
Parameters:
name - durable consumer to query
Returns:
boolean true if it exists
Throws:
javax.jms.JMSException -  

removeDurableConsumer

public boolean removeDurableConsumer(java.lang.String name)
                              throws javax.jms.JMSException
Remove the specified durable consumer
Parameters:
name - name of the consumer
Returns:
boolean true if successful
Throws:
javax.jms.JMSException -  

isConnected

public boolean isConnected(java.lang.String name)
                    throws javax.jms.JMSException
Check to see if the given consumer is currently connected
Parameters:
name - the name of the onsumer.
Returns:
true if the consumer is connected
Throws:
javax.jms.JMSException -  

unregisterConsumer

public boolean unregisterConsumer(java.lang.String name)
                           throws javax.jms.JMSException
De-activate an active persistent consumer.
Parameters:
name - name of the consumer
Returns:
boolean true if successful
Throws:
javax.jms.JMSException -  

addDestination

public boolean addDestination(java.lang.String destination,
                              java.lang.Boolean queue)
                       throws javax.jms.JMSException
Add a specific destination with the specified name
Parameters:
name - destination name
queue - whether it is queue or a topic
Returns:
boolean true if successful
Throws:
javax.jms.JMSException -  

removeDestination

public boolean removeDestination(java.lang.String name)
                          throws javax.jms.JMSException
Destroy the specified destination and all associated messsages and consumers. This is a very dangerous operation to execute while there are clients online
Parameters:
destination - destination to destroy
Throws:
javax.jms.JMSException -  

destinationExists

public boolean destinationExists(java.lang.String name)
                          throws javax.jms.JMSException
Determine if the specified destination exists
Parameters:
name - - the destination to check
Returns:
boolean - true if it exists
Throws:
javax.jms.JMSException -  

stopServer

public void stopServer()
                throws javax.jms.JMSException
Terminate the JMS Server. If it is running as a standalone application then exit the application. It is running as an embedded application then just terminate the thread
Throws:
javax.jms.JMSException -  

purgeMessages

public int purgeMessages()
                  throws javax.jms.JMSException
Purge all processed messages from the database
Returns:
the number of purged messages
Throws:
javax.jms.JMSException -  

addUser

public boolean addUser(java.lang.String username,
                       java.lang.String password)
                throws javax.jms.JMSException
Add a user with the specified name
Parameters:
username - the users name
password - the users password
Returns:
true if the user is added otherwise false
Throws:
javax.jms.JMSException -  

changePassword

public boolean changePassword(java.lang.String username,
                              java.lang.String password)
                       throws javax.jms.JMSException
Change password for the specified user
Parameters:
username - the users name
password - the users password
Returns:
true if the password is changed otherwise false
Throws:
javax.jms.JMSException -  

removeUser

public boolean removeUser(java.lang.String username)
                   throws javax.jms.JMSException
Remove the specified user
Parameters:
username - the users name
Returns:
true if the user is removed otherwise false
Throws:
javax.jms.JMSException -  

getDurableConsumerMessageCount

public int getDurableConsumerMessageCount(java.lang.String topic,
                                          java.lang.String name)
                                   throws javax.jms.JMSException
Return the number of outstanding messages for a particular destination.
Parameters:
topic - name of the topic
name - durable consumer name
Returns:
int message count
Throws:
javax.jms.JMSException - on error

getQueueMessageCount

public int getQueueMessageCount(java.lang.String queue)
                         throws javax.jms.JMSException
Return the number of outstanding messages for a particular queue.
Parameters:
queue - the queue name
Returns:
int message count
Throws:
javax.jms.JMSException - on error

getDurableConsumers

public java.util.Vector getDurableConsumers(java.lang.String destination)
                                     throws javax.jms.JMSException
Return the collection of durable consumer names for a particular topic destination.
Parameters:
destination - the destination name
Returns:
Vector collection of strings
Throws:
javax.jms.JMSException - on error

getAllDestinations

public java.util.Vector getAllDestinations()
                                    throws javax.jms.JMSException
Return a list of all registered destinations.
Returns:
Vector collection of strings
Throws:
javax.jms.JMSException - on error

getAllUsers

public java.util.Vector getAllUsers()
                             throws javax.jms.JMSException
Return a list of all registered users.
Returns:
Vector of users
Throws:
javax.jms.JMSException - on error


Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.