jrun.jms.core.server.rmi
Class RmiJmsAdminServer

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--jrun.jms.core.server.rmi.RmiJmsAdminServer
All Implemented Interfaces:
java.rmi.Remote, RemoteJmsAdminServerIfc, java.io.Serializable

public class RmiJmsAdminServer
extends java.rmi.server.UnicastRemoteObject
implements RemoteJmsAdminServerIfc

This class implements the RemoteJmsAdminServerIfc and simply delegates all the request to the JmsAdmin singleton instance.

Version:
$Revision: 1.6 $ $Date: 2001/05/24 16:36:16 $
Author:
Jim Alateras
See Also:
Remote, Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface jrun.jms.core.server.rmi.RemoteJmsAdminServerIfc
Name
 
Constructor Summary
RmiJmsAdminServer()
          The default constructor simply calls the base class' default constructor.
RmiJmsAdminServer(int port)
          The default constructor simply calls the base class' default constructor.
 
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 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.
 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 topic)
          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
 void stopServer()
          Terminate the JMS Server.
 boolean unregisterConsumer(java.lang.String name)
          De-Activate an active persistent consumer.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RmiJmsAdminServer

public RmiJmsAdminServer(int port)
                  throws java.rmi.RemoteException
The default constructor simply calls the base class' default constructor.
Throws:
RemotException -  

RmiJmsAdminServer

public RmiJmsAdminServer()
                  throws java.rmi.RemoteException
The default constructor simply calls the base class' default constructor.
Throws:
RemotException -  
Method Detail

addDurableConsumer

public boolean addDurableConsumer(java.lang.String topic,
                                  java.lang.String name)
                           throws java.rmi.RemoteException
Description copied from interface: RemoteJmsAdminServerIfc
Add a consumer for the specified topic
Specified by:
addDurableConsumer in interface RemoteJmsAdminServerIfc
Following copied from interface: jrun.jms.core.server.rmi.RemoteJmsAdminServerIfc
Parameters:
topic - name of the destination
name - name of the consumer
Returns:
boolean true if successful
Throws:
java.rmi.RemoteException -  

removeDurableConsumer

public boolean removeDurableConsumer(java.lang.String name)
                              throws java.rmi.RemoteException
Description copied from interface: RemoteJmsAdminServerIfc
Remove the consumer attached to the specified destination and with the passed in name
Specified by:
removeDurableConsumer in interface RemoteJmsAdminServerIfc
Following copied from interface: jrun.jms.core.server.rmi.RemoteJmsAdminServerIfc
Parameters:
name - name of the consumer
Returns:
boolean true if successful
Throws:
java.rmi.RemoteException -  

durableConsumerExists

public boolean durableConsumerExists(java.lang.String name)
                              throws java.rmi.RemoteException
Description copied from interface: RemoteJmsAdminServerIfc
Check if a durable consumer, with the specified name, already exists
Specified by:
durableConsumerExists in interface RemoteJmsAdminServerIfc
Following copied from interface: jrun.jms.core.server.rmi.RemoteJmsAdminServerIfc
Parameters:
name - name of the consumer
Returns:
boolean true if it exists
Throws:
java.rmi.RemoteException -  

unregisterConsumer

public boolean unregisterConsumer(java.lang.String name)
                           throws java.rmi.RemoteException
Description copied from interface: RemoteJmsAdminServerIfc
De-Activate an active persistent consumer.
Specified by:
unregisterConsumer in interface RemoteJmsAdminServerIfc
Following copied from interface: jrun.jms.core.server.rmi.RemoteJmsAdminServerIfc
Parameters:
name - name of the consumer
Returns:
boolean true if successful
Throws:
java.rmi.RemoteException -  

isConnected

public boolean isConnected(java.lang.String name)
                    throws java.rmi.RemoteException
Description copied from interface: RemoteJmsAdminServerIfc
Check to see if the given consumer is currently connected to the OpenJMSServer. This is only valid when in online mode.
Specified by:
isConnected in interface RemoteJmsAdminServerIfc
Following copied from interface: jrun.jms.core.server.rmi.RemoteJmsAdminServerIfc
Parameters:
name - The name of the onsumer.
Returns:
boolean True if the consumer is connected.
Throws:
java.rmi.RemoteException -  

getAllDestinations

public java.util.Vector getAllDestinations()
                                    throws java.rmi.RemoteException
Description copied from interface: RemoteJmsAdminServerIfc
Return a list of all registered destinations.
Specified by:
getAllDestinations in interface RemoteJmsAdminServerIfc
Following copied from interface: jrun.jms.core.server.rmi.RemoteJmsAdminServerIfc
Returns:
Vector collection of strings
Throws:
java.rmi.RemoteException -  

addDestination

public boolean addDestination(java.lang.String destination,
                              java.lang.Boolean queue)
                       throws java.rmi.RemoteException
Description copied from interface: RemoteJmsAdminServerIfc
Add a specific destination with the specified name
Specified by:
addDestination in interface RemoteJmsAdminServerIfc
Following copied from interface: jrun.jms.core.server.rmi.RemoteJmsAdminServerIfc
Parameters:
name - destination name
queue - whether it is queue or a topic
Returns:
boolean true if successful
Throws:
java.rmi.RemoteException -  

getDurableConsumerMessageCount

public int getDurableConsumerMessageCount(java.lang.String topic,
                                          java.lang.String name)
                                   throws java.rmi.RemoteException
Description copied from interface: RemoteJmsAdminServerIfc
Return the number of outstanding messages for a particular destination.
Specified by:
getDurableConsumerMessageCount in interface RemoteJmsAdminServerIfc
Following copied from interface: jrun.jms.core.server.rmi.RemoteJmsAdminServerIfc
Parameters:
topic - name of the topic
name - durable consumer name
Returns:
int message count
Throws:
java.rmi.RemoteException -  

getQueueMessageCount

public int getQueueMessageCount(java.lang.String queue)
                         throws java.rmi.RemoteException
Description copied from interface: RemoteJmsAdminServerIfc
Return the number of outstanding messages for a particular queue.
Specified by:
getQueueMessageCount in interface RemoteJmsAdminServerIfc
Following copied from interface: jrun.jms.core.server.rmi.RemoteJmsAdminServerIfc
Parameters:
queue - the queue name
Returns:
int message count
Throws:
java.rmi.RemoteException -  

getDurableConsumers

public java.util.Vector getDurableConsumers(java.lang.String topic)
                                     throws java.rmi.RemoteException
Description copied from interface: RemoteJmsAdminServerIfc
Return the collection of durable consumer names for a particular topic destination.
Specified by:
getDurableConsumers in interface RemoteJmsAdminServerIfc
Following copied from interface: jrun.jms.core.server.rmi.RemoteJmsAdminServerIfc
Parameters:
topic - the topic name
Returns:
Vector collection of strings
Throws:
java.rmi.RemoteException -  

removeDestination

public boolean removeDestination(java.lang.String name)
                          throws java.rmi.RemoteException
Description copied from interface: RemoteJmsAdminServerIfc
Destroy the specified destination and all associated messsages and consumers. This is a very dangerous operation to execute while there are clients online
Specified by:
removeDestination in interface RemoteJmsAdminServerIfc
Following copied from interface: jrun.jms.core.server.rmi.RemoteJmsAdminServerIfc
Parameters:
destination - destination to destroy
Throws:
java.rmi.RemoteException -  

purgeMessages

public int purgeMessages()
                  throws java.rmi.RemoteException
Description copied from interface: RemoteJmsAdminServerIfc
Purge all processed messages from the database
Specified by:
purgeMessages in interface RemoteJmsAdminServerIfc
Following copied from interface: jrun.jms.core.server.rmi.RemoteJmsAdminServerIfc
Returns:
int the number of purged messages
Throws:
java.rmi.RemoteException -  

stopServer

public void stopServer()
                throws java.rmi.RemoteException
Description copied from interface: RemoteJmsAdminServerIfc
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
Specified by:
stopServer in interface RemoteJmsAdminServerIfc


Copyright � 2002 Macromedia Corporation. All Rights Reserved.