org.exolab.jms.server.net
Interface RemoteJmsAdminConnectionIfc

All Known Implementing Classes:
JmsAdminConnectionImpl

public interface RemoteJmsAdminConnectionIfc

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:51:01 $
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 consumer for the specified topic
 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 whether the destination with the specified name exists
 boolean durableConsumerExists(java.lang.String name)
          Check if a durable consumer, with the specified name, already 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 consumer attached to the specified destination and with the passed in name
 boolean removeUser(java.lang.String username)
          Remove the specified user
 void stopServer()
          Terminate the JMS Server.
 boolean unregisterConsumer(java.lang.String name)
          Deactivate an active persistent consumer.
 

Method Detail

addDurableConsumer

public boolean addDurableConsumer(java.lang.String topic,
                                  java.lang.String name)
                           throws java.rmi.RemoteException
Add a consumer for the specified topic
Parameters:
topic - name of the destination
name - name of the consumer
Returns:
boolean true if successful
Throws:
java.rmi.RemoteException - if the connection cannot be created

removeDurableConsumer

public boolean removeDurableConsumer(java.lang.String name)
                              throws java.rmi.RemoteException
Remove the consumer attached to the specified destination and with the passed in name
Parameters:
name - name of the consumer
Returns:
boolean true if successful
Throws:
java.rmi.RemoteException - if the connection cannot be created

durableConsumerExists

public boolean durableConsumerExists(java.lang.String name)
                              throws java.rmi.RemoteException
Check if a durable consumer, with the specified name, already exists
Parameters:
name - name of the consumer
Returns:
boolean true if it exists
Throws:
java.rmi.RemoteException - if the connection cannot be created

getDurableConsumers

public java.util.Vector getDurableConsumers(java.lang.String destination)
                                     throws java.rmi.RemoteException
Return the collection of durable consumer names for a particular topic destination.
Parameters:
destination - the destination name
Returns:
Vector collection of strings
Throws:
java.rmi.RemoteException - if the connection cannot be created

unregisterConsumer

public boolean unregisterConsumer(java.lang.String name)
                           throws java.rmi.RemoteException
Deactivate an active persistent consumer.
Parameters:
name - name of the consumer
Returns:
boolean true if successful
Throws:
java.rmi.RemoteException - if the consumer cannot be unregistered

isConnected

public boolean isConnected(java.lang.String name)
                    throws java.rmi.RemoteException
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:
java.rmi.RemoteException - if the connection cannot be created

addDestination

public boolean addDestination(java.lang.String destination,
                              java.lang.Boolean queue)
                       throws java.rmi.RemoteException
Add a specific destination with the specified name
Parameters:
destination - destination name
queue - whether it is queue or a topic
Returns:
boolean true if successful
Throws:
java.rmi.RemoteException - if the connection cannot be created

removeDestination

public boolean removeDestination(java.lang.String name)
                          throws java.rmi.RemoteException
Destroy the specified destination and all associated messsages and consumers. This is a very dangerous operation to execute while there are clients online
Parameters:
name - destination to destroy
Returns:
boolean if the destination got destroyed
Throws:
java.rmi.RemoteException - if the connection cannot be created

destinationExists

public boolean destinationExists(java.lang.String name)
                          throws java.rmi.RemoteException
Determine whether the destination with the specified name exists
Parameters:
name - - the destination to check
Returns:
boolean - if the destination exists
Throws:
java.rmi.RemoteException - if the connection cannot be created

getAllDestinations

public java.util.Vector getAllDestinations()
                                    throws java.rmi.RemoteException
Return a list of all registered destinations.
Returns:
Vector collection of strings
Throws:
java.rmi.RemoteException - if the connection cannot be created

getDurableConsumerMessageCount

public int getDurableConsumerMessageCount(java.lang.String topic,
                                          java.lang.String name)
                                   throws java.rmi.RemoteException
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:
java.rmi.RemoteException - if the connection cannot be created

getQueueMessageCount

public int getQueueMessageCount(java.lang.String queue)
                         throws java.rmi.RemoteException
Return the number of outstanding messages for a particular queue.
Parameters:
queue - the queue name
Returns:
int message count
Throws:
java.rmi.RemoteException - if the connection cannot be created

purgeMessages

public int purgeMessages()
                  throws java.rmi.RemoteException
Purge all processed messages from the database
Returns:
int the number of purged messages
Throws:
java.rmi.RemoteException - if the connection cannot be created

stopServer

public void stopServer()
                throws java.rmi.RemoteException
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:
java.rmi.RemoteException - if the connection cannot be created

addUser

public boolean addUser(java.lang.String username,
                       java.lang.String password)
                throws java.rmi.RemoteException
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:
java.rmi.RemoteException - if the connection cannot be created

changePassword

public boolean changePassword(java.lang.String username,
                              java.lang.String password)
                       throws java.rmi.RemoteException
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:
java.rmi.RemoteException - if the connection cannot be created

removeUser

public boolean removeUser(java.lang.String username)
                   throws java.rmi.RemoteException
Remove the specified user
Parameters:
username - the users name
Returns:
true if the user is removed otherwise false
Throws:
java.rmi.RemoteException - if the connection cannot be created

getAllUsers

public java.util.Vector getAllUsers()
                             throws java.rmi.RemoteException
Return a list of all registered users.
Returns:
Vector of users
Throws:
java.rmi.RemoteException - if the connection cannot be created


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