|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jms.administration.mipc.IpcJmsAdminConnection
This class is repsonsible for opening a TCP connection to the server and passing and packing all requests for delivery.
Constructor Summary | |
protected |
IpcJmsAdminConnection(java.lang.String host,
int port)
Construct a new IpcJmsAdminConnection ,
without establishing a connection |
|
IpcJmsAdminConnection(java.lang.String host,
int port,
java.lang.String username,
java.lang.String password)
Construct a new IpcJmsAdminConnection ,
establishing a connection to the server |
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. |
protected void |
connect(java.lang.String username,
java.lang.String password)
Opens an authenticated connection to the server |
protected org.exolab.core.mipc.MultiplexConnectionIfc |
createClientConnection(java.lang.String host,
int port)
Create an MIPC client 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. |
protected org.exolab.core.ipc.IpcIfc |
getConnection()
Returns the underlying connection |
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. |
protected java.lang.String |
getHost()
Returns the server host |
protected int |
getPort()
Returns the server port |
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 |
protected void |
openConnection()
Opens a connection to the server. |
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 |
protected void |
setConnection(org.exolab.core.ipc.IpcIfc connection)
Sets the underlying connection |
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 |
protected IpcJmsAdminConnection(java.lang.String host, int port)
IpcJmsAdminConnection
,
without establishing a connectionhost
- the server hostport
- the server portpublic IpcJmsAdminConnection(java.lang.String host, int port, java.lang.String username, java.lang.String password) throws javax.jms.JMSException
IpcJmsAdminConnection
,
establishing a connection to the serverhost
- the server hostport
- the server portusername
- the admin user namepassword
- the admin passwordJMSEXception
- if a connection cannot be establishedMethod Detail |
public boolean addDurableConsumer(java.lang.String topic, java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
addDurableConsumer
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
topic
- name of the destinationname
- name of the consumerjavax.jms.JMSException
- public boolean removeDurableConsumer(java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
removeDurableConsumer
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
name
- name of the consumerjavax.jms.JMSException
- public java.util.Vector getDurableConsumers(java.lang.String topic) throws javax.jms.JMSException
JmsAdminServerIfc
getDurableConsumers
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
topic
- the topic namejavax.jms.JMSException
- public boolean durableConsumerExists(java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
durableConsumerExists
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
name
- durable consumer to queryjavax.jms.JMSException
- public boolean isConnected(java.lang.String name) throws javax.jms.JMSException
isConnected
in interface JmsAdminServerIfc
name
- the name of the onsumer.true
if the consumer is connectedjavax.jms.JMSException
- public boolean unregisterConsumer(java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
unregisterConsumer
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
name
- name of the consumerjavax.jms.JMSException
- public boolean addDestination(java.lang.String destination, java.lang.Boolean queue) throws javax.jms.JMSException
JmsAdminServerIfc
addDestination
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
name
- destination namequeue
- whether it is queue or a topicjavax.jms.JMSException
- public boolean removeDestination(java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
removeDestination
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
destination
- destination to destroyjavax.jms.JMSException
- public boolean destinationExists(java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
destinationExists
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
name
- - the destination to checkjavax.jms.JMSException
- public java.util.Vector getAllDestinations() throws javax.jms.JMSException
JmsAdminServerIfc
getAllDestinations
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
javax.jms.Destination
instancesjavax.jms.JMSException
- public int getDurableConsumerMessageCount(java.lang.String topic, java.lang.String name) throws javax.jms.JMSException
JmsAdminServerIfc
getDurableConsumerMessageCount
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
topic
- name of the topicname
- durable consumer namejavax.jms.JMSException
- public int getQueueMessageCount(java.lang.String queue) throws javax.jms.JMSException
JmsAdminServerIfc
getQueueMessageCount
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
queue
- the queue namejavax.jms.JMSException
- public int purgeMessages() throws javax.jms.JMSException
JmsAdminServerIfc
purgeMessages
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
javax.jms.JMSException
- public void stopServer() throws javax.jms.JMSException
JmsAdminServerIfc
stopServer
in interface JmsAdminServerIfc
org.exolab.jms.administration.AdminConnection
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 JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
username
- the users namepassword
- the users passwordtrue
if the user is added
otherwise false
public java.util.Vector getAllUsers() throws javax.jms.JMSException
JmsAdminServerIfc
getAllUsers
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
javax.jms.JMSException
- public boolean removeUser(java.lang.String username) throws javax.jms.JMSException
JmsAdminServerIfc
removeUser
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
username
- the users nametrue
if the user is removed
otherwise false
public boolean changePassword(java.lang.String username, java.lang.String password) throws javax.jms.JMSException
JmsAdminServerIfc
changePassword
in interface JmsAdminServerIfc
org.exolab.jms.administration.JmsAdminServerIfc
username
- the users namepassword
- the users passwordtrue
if the password is changed
otherwise false
protected java.lang.String getHost()
protected int getPort()
protected org.exolab.core.ipc.IpcIfc getConnection()
protected void setConnection(org.exolab.core.ipc.IpcIfc connection)
connection
- the underlying connectionprotected void openConnection() throws javax.jms.JMSException
javax.jms.JMSException
- if an error occursprotected void connect(java.lang.String username, java.lang.String password) throws javax.jms.JMSException
username
- the user's namepassword
- the user's passwordjavax.jms.JMSException
- if the connection cannot be establishedprotected org.exolab.core.mipc.MultiplexConnectionIfc createClientConnection(java.lang.String host, int port) throws java.io.IOException
host
- the host of the serverport
- the port number to usejava.io.IOException
- if the server fails to initialise the ip service
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |