|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.jms.tools.admin.AbstractAdminConnection
org.exolab.jms.tools.admin.OnlineConnection
public class OnlineConnection
Connects to the OpenJMSServer for all updates and requests.
Note: The OpenJMSServer must be active and in a running state for this type of connection to succeed.
Field Summary |
---|
Fields inherited from class org.exolab.jms.tools.admin.AbstractAdminConnection |
---|
_instance |
Constructor Summary | |
---|---|
OnlineConnection(java.awt.Component parent,
org.exolab.jms.config.Configuration config)
Connect to the Admin Server |
|
OnlineConnection(java.lang.String username,
java.lang.String password,
org.exolab.jms.config.Configuration config)
Connect to the Admin Server, special constructor to be able to stop the server |
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 OnlineConnection(java.awt.Component parent, org.exolab.jms.config.Configuration config) throws OnlineConnectionException
OnlineConnectionException
- When online connection fails.public OnlineConnection(java.lang.String username, java.lang.String password, org.exolab.jms.config.Configuration config) throws OnlineConnectionException
OnlineConnectionException
- When online connection fails.Method 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
topic
- name of the destinationname
- name of the consumer
public boolean removeDurableConsumer(java.lang.String name)
AbstractAdminConnection
removeDurableConsumer
in class AbstractAdminConnection
name
- name of the consumer
public boolean unregisterConsumer(java.lang.String name)
AbstractAdminConnection
unregisterConsumer
in class AbstractAdminConnection
name
- name of the consumer
public boolean isConnected(java.lang.String name)
AbstractAdminConnection
isConnected
in class AbstractAdminConnection
name
- The name of the onsumer.
public java.util.Enumeration getAllDestinations()
AbstractAdminConnection
getAllDestinations
in class AbstractAdminConnection
public boolean addDestination(java.lang.String destination, boolean isQueue)
AbstractAdminConnection
addDestination
in class AbstractAdminConnection
public int getDurableConsumerMessageCount(java.lang.String topic, java.lang.String name)
AbstractAdminConnection
getDurableConsumerMessageCount
in class AbstractAdminConnection
topic
- name of the topicname
- durable consumer name
public int getQueueMessageCount(java.lang.String queue)
AbstractAdminConnection
getQueueMessageCount
in class AbstractAdminConnection
queue
- the queue name
public boolean durableConsumerExists(java.lang.String name)
AbstractAdminConnection
durableConsumerExists
in class AbstractAdminConnection
name
- name of the durable conusmer
public java.util.Enumeration getDurableConsumers(java.lang.String topic)
AbstractAdminConnection
getDurableConsumers
in class AbstractAdminConnection
public boolean removeDestination(java.lang.String destination)
AbstractAdminConnection
removeDestination
in class AbstractAdminConnection
public int purgeMessages()
AbstractAdminConnection
purgeMessages
in class 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
username
- the users namepassword
- the users password
true
if the user is added
otherwise false
public boolean changePassword(java.lang.String username, java.lang.String password)
AbstractAdminConnection
changePassword
in class AbstractAdminConnection
username
- the users namepassword
- the users password
true
if the password is changed
otherwise false
public boolean removeUser(java.lang.String username)
AbstractAdminConnection
removeUser
in class AbstractAdminConnection
username
- the users name
true
if the user is removed
otherwise false
public java.util.Enumeration getAllUsers()
AbstractAdminConnection
getAllUsers
in class AbstractAdminConnection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |