|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jms.tools.admin.AbstractAdminConnection | +--org.exolab.jms.tools.admin.OfflineConnection
Connect directly to the Persistent store to retrieve information and perfrom updates.
Note: If the OpenJMSServer is active, this connection will fail, since it requires and exclusive lock on the database to avoid database corruption. Similarly, if this connection is active the OpenJMSServer cannot be started for the same reasons.
AbstractAdminConnection
,
AdminMgr
Fields inherited from class org.exolab.jms.tools.admin.AbstractAdminConnection |
_instance |
Constructor Summary | |
OfflineConnection(java.awt.Component parent,
org.exolab.jms.config.Configuration config)
Connect to the RMIAdmin Server if in online mode, or open the database and update the data directly in offline mode. |
Method Summary | |
boolean |
addDestination(java.lang.String destination,
boolean isQueue)
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)
Adds a new User to the DB. |
boolean |
changePassword(java.lang.String username,
java.lang.String password)
Change the password for this user |
void |
close()
Close the connection. |
boolean |
durableConsumerExists(java.lang.String name)
Check if the durable consumer exists. |
java.util.Enumeration |
getAllDestinations()
Return a list of all registered destinations. |
java.util.Enumeration |
getAllUsers()
List all users in the DB |
int |
getDurableConsumerMessageCount(java.lang.String topic,
java.lang.String name)
Return the number of outstanding messages for a particular destination. |
java.util.Enumeration |
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 destination)
Destroy the specified destination and all associated messsages and consumers. |
boolean |
removeDurableConsumer(java.lang.String name)
Remove the consumer with the specified name |
boolean |
removeUser(java.lang.String username)
Remove a user from the DB. |
void |
stopServer()
Terminate the JMS Server. |
boolean |
unregisterConsumer(java.lang.String name)
De-Activate an active persistent consumer. |
Methods inherited from class org.exolab.jms.tools.admin.AbstractAdminConnection |
instance |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OfflineConnection(java.awt.Component parent, org.exolab.jms.config.Configuration config) throws OfflineConnectionException
parent
- The component parent.OfflineConnectionException
- When the database cannot be openedMethod Detail |
public void close()
AbstractAdminConnection
close
in class AbstractAdminConnection
public boolean addDurableConsumer(java.lang.String topic, java.lang.String name)
AbstractAdminConnection
addDurableConsumer
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
topic
- name of the destinationname
- name of the consumerpublic boolean removeDurableConsumer(java.lang.String name)
AbstractAdminConnection
removeDurableConsumer
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
name
- name of the consumerpublic boolean unregisterConsumer(java.lang.String name)
AbstractAdminConnection
unregisterConsumer
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
name
- name of the consumerpublic boolean isConnected(java.lang.String name)
AbstractAdminConnection
isConnected
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
name
- The name of the onsumer.public java.util.Enumeration getAllDestinations()
AbstractAdminConnection
getAllDestinations
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
public boolean addDestination(java.lang.String destination, boolean isQueue)
AbstractAdminConnection
addDestination
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
name
- destination namequeue
- whether it is queue or a topicpublic int getDurableConsumerMessageCount(java.lang.String topic, java.lang.String name)
AbstractAdminConnection
getDurableConsumerMessageCount
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
topic
- name of the topicname
- durable consumer namepublic int getQueueMessageCount(java.lang.String queue)
AbstractAdminConnection
getQueueMessageCount
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
queue
- the queue namepublic boolean durableConsumerExists(java.lang.String name)
AbstractAdminConnection
durableConsumerExists
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
name
- name of the durable conusmerpublic java.util.Enumeration getDurableConsumers(java.lang.String topic)
AbstractAdminConnection
getDurableConsumers
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
topic
- the topic namepublic boolean removeDestination(java.lang.String destination)
AbstractAdminConnection
removeDestination
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
destination
- destination to destroypublic int purgeMessages()
AbstractAdminConnection
purgeMessages
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
public void stopServer()
AbstractAdminConnection
stopServer
in class AbstractAdminConnection
public boolean addUser(java.lang.String username, java.lang.String password)
AbstractAdminConnection
addUser
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
username
- the users namepassword
- the users passwordtrue
if the user is added
otherwise false
public boolean changePassword(java.lang.String username, java.lang.String password)
AbstractAdminConnection
changePassword
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
username
- the users namepassword
- the users passwordtrue
if the password is changed
otherwise false
public boolean removeUser(java.lang.String username)
AbstractAdminConnection
removeUser
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
username
- the users nametrue
if the user is removed
otherwise false
public java.util.Enumeration getAllUsers()
AbstractAdminConnection
getAllUsers
in class AbstractAdminConnection
org.exolab.jms.tools.admin.AbstractAdminConnection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |