|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.client.jms.admin.AdminModule
The AdminModule
class allows to set an administrator
connection to a given JORAM server, and provides administration and
monitoring methods at a server/platform level.
Field Summary | |
protected static java.lang.String |
localHost
The host name or IP address this client is connected to. |
protected static int |
localPort
The port number of the client connection. |
protected static AdminReply |
reply
Reply object received from the platform. |
Constructor Summary | |
AdminModule()
|
Method Summary | |
static void |
collocatedConnect(java.lang.String name,
java.lang.String password)
Opens a connection with the collocated JORAM server. |
static void |
connect(java.lang.String hostName,
int port,
java.lang.String name,
java.lang.String password,
int cnxTimer)
Opens a TCP connection with the Joram server running on a given host and listening to a given port. |
static void |
connect(java.lang.String name,
java.lang.String password,
int cnxTimer)
Opens a TCP connection with the Joram server running on the default "locahost" host and listening to the default 16010 port. |
static void |
connect(javax.jms.TopicConnectionFactory cnxFact,
java.lang.String name,
java.lang.String password)
Opens a connection dedicated to administering with the Joram server which parameters are wrapped by a given TopicConnectionFactory . |
static void |
disconnect()
Closes the administration connection. |
static AdminReply |
doRequest(AdminRequest request)
Method actually sending an AdminRequest instance to
the platform and getting an AdminReply instance. |
static DeadMQueue |
getDefaultDMQ()
Returns the default dead message queue for the local server, null if not set. |
static DeadMQueue |
getDefaultDMQ(int serverId)
Returns the default dead message queue for a given server, null if not set. |
static int |
getDefaultThreshold()
Returns the default threshold value for the local server, -1 if not set. |
static int |
getDefaultThreshold(int serverId)
Returns the default threshold value for a given server, -1 if not set. |
static java.util.List |
getDestinations()
Returns the list of all destinations that exist on the local server, or an empty list if none exist. |
static java.util.List |
getDestinations(int serverId)
Returns the list of all destinations that exist on a given server, or an empty list if none exist. |
static java.lang.String |
getLocalHost()
Returns the host name of the server the module is connected to. |
static int |
getLocalPort()
Returns the port number of the server the module is connected to. |
static int |
getLocalServer()
Returns the identifier of the server the module is connected to. |
static java.util.List |
getServersIds()
Returns the list of the platform's servers' identifiers. |
static java.util.List |
getUsers()
Returns the list of all users that exist on the local server, or an empty list if none exist. |
static java.util.List |
getUsers(int serverId)
Returns the list of all users that exist on a given server, or an empty list if none exist. |
static void |
setDefaultDMQ(DeadMQueue dmq)
Sets a given dead message queue as the default DMQ for the local server ( null for unsetting previous DMQ). |
static void |
setDefaultDMQ(int serverId,
DeadMQueue dmq)
Sets a given dead message queue as the default DMQ for a given server ( null for unsetting previous DMQ). |
static void |
setDefaultThreshold(int threshold)
Sets a given value as the default threshold for the local server (-1 for unsetting previous value). |
static void |
setDefaultThreshold(int serverId,
int threshold)
Sets a given value as the default threshold for a given server (-1 for unsetting previous value). |
static void |
stopServer()
Stops the platform local server. |
static void |
stopServer(int serverId)
Stops a given server of the platform. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static java.lang.String localHost
protected static int localPort
protected static AdminReply reply
Constructor Detail |
public AdminModule()
Method Detail |
public static void connect(javax.jms.TopicConnectionFactory cnxFact, java.lang.String name, java.lang.String password) throws java.net.ConnectException, AdminException
TopicConnectionFactory
.
cnxFact
- The TopicConnectionFactory to use for connecting.name
- Administrator's name.password
- Administrator's password.
java.net.ConnectException
- If connecting fails.
AdminException
- If the administrator identification is
incorrect.public static void connect(java.lang.String hostName, int port, java.lang.String name, java.lang.String password, int cnxTimer) throws java.net.UnknownHostException, java.net.ConnectException, AdminException
port
- The number of the port the server is listening to.name
- Administrator's name.password
- Administrator's password.cnxTimer
- Timer in seconds during which connecting to the server
is attempted.
java.net.UnknownHostException
- If the host is invalid.
java.net.ConnectException
- If connecting fails.
AdminException
- If the administrator identification is
incorrect.public static void connect(java.lang.String name, java.lang.String password, int cnxTimer) throws java.net.UnknownHostException, java.net.ConnectException, AdminException
name
- Administrator's name.password
- Administrator's password.cnxTimer
- Timer in seconds during which connecting to the server
is attempted.
java.net.UnknownHostException
- Never thrown.
java.net.ConnectException
- If connecting fails.
AdminException
- If the administrator identification is
incorrect.public static void collocatedConnect(java.lang.String name, java.lang.String password) throws java.net.ConnectException, AdminException
name
- Administrator's name.password
- Administrator's password.
java.net.ConnectException
- If connecting fails.
AdminException
- If the administrator identification is
incorrect.public static void disconnect()
public static void stopServer(int serverId) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform.
serverId
- Identifier of the server to stop.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static void stopServer() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static void setDefaultDMQ(int serverId, DeadMQueue dmq) throws java.net.ConnectException, AdminException
null
for unsetting previous DMQ).
The request fails if the target server does not belong to the platform.
serverId
- The identifier of the server.dmq
- The dmq to be set as the default one.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static void setDefaultDMQ(DeadMQueue dmq) throws java.net.ConnectException, AdminException
null
for unsetting previous DMQ).
dmq
- The dmq to be set as the default one.
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static void setDefaultThreshold(int serverId, int threshold) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform.
serverId
- The identifier of the server.threshold
- The threshold value to be set.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static void setDefaultThreshold(int threshold) throws java.net.ConnectException, AdminException
threshold
- The threshold value to be set.
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static java.util.List getServersIds() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static DeadMQueue getDefaultDMQ(int serverId) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static DeadMQueue getDefaultDMQ() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static int getDefaultThreshold(int serverId) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static int getDefaultThreshold() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static java.util.List getDestinations(int serverId) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public static java.util.List getDestinations() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- Never thrown.public static java.util.List getUsers(int serverId) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static java.util.List getUsers() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static int getLocalServer() throws java.net.ConnectException
java.net.ConnectException
- If the admin connection is not established.public static java.lang.String getLocalHost() throws java.net.ConnectException
java.net.ConnectException
- If the admin connection is not established.public static int getLocalPort() throws java.net.ConnectException
java.net.ConnectException
- If the admin connection is not established.public static AdminReply doRequest(AdminRequest request) throws AdminException, java.net.ConnectException
AdminRequest
instance to
the platform and getting an AdminReply
instance.
java.net.ConnectException
- If the connection to the platform fails.
AdminException
- If the platform's reply is invalid, or if
the request failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |