org.exolab.jms.administration
Interface JmsAdminServerIfc

All Known Implementing Classes:
JmsAdminConnectionImpl

public interface JmsAdminServerIfc

This specifies all the administration methods that can be used to control the JMS server through an RMI connector. 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:
Jim Alateras

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 the passed in 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
 void close()
          Close the connection.
 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 to the OpenJMSServer.
 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 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

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 -  

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 -  

addDurableConsumer

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

removeDurableConsumer

public boolean removeDurableConsumer(java.lang.String name)
                              throws javax.jms.JMSException
Remove the the specified durable consumer
Parameters:
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 -  

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:
topic - the topic name
Returns:
Vector collection of strings
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 -  

isConnected

public boolean isConnected(java.lang.String name)
                    throws javax.jms.JMSException
Check to see if the given consumer is currently connected to the OpenJMSServer. This is only valid when in online mode.
Parameters:
name - The name of the onsumer.
Returns:
boolean True if the consumer is connected.
Throws:
javax.jms.JMSException -  

getAllDestinations

public java.util.Vector getAllDestinations()
                                    throws javax.jms.JMSException
Return a list of all registered destinations.
Returns:
a collection of javax.jms.Destination instances
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

purgeMessages

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

close

public void close()
Close the connection.

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

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

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

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 -  


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