|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.jms.administration.net.JmsAdminConnectionImpl
public class JmsAdminConnectionImpl
This class is repsonsible for an admin connection to the server
AdminConnectionFactory
Constructor Summary | |
---|---|
JmsAdminConnectionImpl(java.lang.String url,
java.lang.String username,
java.lang.String password)
Construct a new JmsAdminConnectionImpl |
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 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 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JmsAdminConnectionImpl(java.lang.String url, java.lang.String username, java.lang.String password) throws javax.jms.JMSException
JmsAdminConnectionImpl
url
- the server URIusername
- the client's usernamepassword
- the client's password
javax.jms.JMSException
Method Detail |
---|
public boolean addDurableConsumer(java.lang.String topic, java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
addDurableConsumer
in interface AdminConnection
addDurableConsumer
in interface JmsAdminServerIfc
topic
- name of the destinationname
- name of the consumer
javax.jms.JMSException
public boolean removeDurableConsumer(java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
removeDurableConsumer
in interface AdminConnection
removeDurableConsumer
in interface JmsAdminServerIfc
name
- name of the consumer
javax.jms.JMSException
public boolean durableConsumerExists(java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
durableConsumerExists
in interface AdminConnection
durableConsumerExists
in interface JmsAdminServerIfc
name
- durable consumer to query
javax.jms.JMSException
public java.util.Vector getDurableConsumers(java.lang.String topic) throws javax.jms.JMSException
JmsAdminServerIfc
getDurableConsumers
in interface AdminConnection
getDurableConsumers
in interface JmsAdminServerIfc
topic
- the destination name
javax.jms.JMSException
- on errorpublic boolean unregisterConsumer(java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
unregisterConsumer
in interface AdminConnection
unregisterConsumer
in interface JmsAdminServerIfc
name
- name of the consumer
javax.jms.JMSException
public boolean isConnected(java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
isConnected
in interface AdminConnection
isConnected
in interface JmsAdminServerIfc
name
- The name of the onsumer.
javax.jms.JMSException
public boolean addDestination(java.lang.String destination, java.lang.Boolean queue) throws javax.jms.JMSException
JmsAdminServerIfc
addDestination
in interface AdminConnection
addDestination
in interface JmsAdminServerIfc
queue
- whether it is queue or a topic
javax.jms.JMSException
public boolean removeDestination(java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
removeDestination
in interface AdminConnection
removeDestination
in interface JmsAdminServerIfc
javax.jms.JMSException
public boolean destinationExists(java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
destinationExists
in interface AdminConnection
destinationExists
in interface JmsAdminServerIfc
name
- - the destination to check
javax.jms.JMSException
public java.util.Vector getAllDestinations() throws javax.jms.JMSException
JmsAdminServerIfc
getAllDestinations
in interface AdminConnection
getAllDestinations
in interface JmsAdminServerIfc
javax.jms.Destination
instances
javax.jms.JMSException
- on errorpublic int getDurableConsumerMessageCount(java.lang.String topic, java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
getDurableConsumerMessageCount
in interface AdminConnection
getDurableConsumerMessageCount
in interface JmsAdminServerIfc
topic
- name of the topicname
- durable consumer name
javax.jms.JMSException
- on errorpublic int getQueueMessageCount(java.lang.String queue) throws javax.jms.JMSException
JmsAdminServerIfc
getQueueMessageCount
in interface AdminConnection
getQueueMessageCount
in interface JmsAdminServerIfc
queue
- the queue name
javax.jms.JMSException
- on errorpublic int purgeMessages() throws javax.jms.JMSException
JmsAdminServerIfc
purgeMessages
in interface AdminConnection
purgeMessages
in interface JmsAdminServerIfc
javax.jms.JMSException
public void stopServer() throws javax.jms.JMSException
JmsAdminServerIfc
stopServer
in interface AdminConnection
stopServer
in interface JmsAdminServerIfc
javax.jms.JMSException
public void close()
JmsAdminServerIfc
close
in interface JmsAdminServerIfc
public boolean addUser(java.lang.String username, java.lang.String password) throws javax.jms.JMSException
JmsAdminServerIfc
addUser
in interface AdminConnection
addUser
in interface JmsAdminServerIfc
username
- the users namepassword
- the users password
true
if the user is added
otherwise false
javax.jms.JMSException
public java.util.Vector getAllUsers() throws javax.jms.JMSException
JmsAdminServerIfc
getAllUsers
in interface AdminConnection
getAllUsers
in interface JmsAdminServerIfc
javax.jms.JMSException
- on errorpublic boolean removeUser(java.lang.String username) throws javax.jms.JMSException
JmsAdminServerIfc
removeUser
in interface AdminConnection
removeUser
in interface JmsAdminServerIfc
username
- the users name
true
if the user is removed
otherwise false
javax.jms.JMSException
public boolean changePassword(java.lang.String username, java.lang.String password) throws javax.jms.JMSException
JmsAdminServerIfc
changePassword
in interface AdminConnection
changePassword
in interface JmsAdminServerIfc
username
- the users namepassword
- the users password
true
if the password is changed
otherwise false
javax.jms.JMSException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |