collocatedConnect
public static void collocatedConnect(String name,
String password)
throws ConnectException,
AdminException
Opens a connection with the collocated JORAM server.
name
- Administrator's name.password
- Administrator's password.
AdminException
- If the administrator identification is
incorrect.
connect
public static void connect(String name,
String password,
int cnxTimer)
throws UnknownHostException,
ConnectException,
AdminException
Opens a TCP connection with the Joram server running on the default
"locahost" host and listening to the default 16010 port.
name
- Administrator's name.password
- Administrator's password.cnxTimer
- Timer in seconds during which connecting to the server
is attempted.
AdminException
- If the administrator identification is
incorrect.
connect
public static void connect(String hostName,
int port,
String name,
String password,
int cnxTimer)
throws UnknownHostException,
ConnectException,
AdminException
Opens a TCP connection with the Joram server running on a given host and
listening to a given port.
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.
AdminException
- If the administrator identification is
incorrect.
connect
public static void connect(javax.jms.TopicConnectionFactory cnxFact,
String name,
String password)
throws ConnectException,
AdminException
Opens a connection dedicated to administering with the Joram server
which parameters are wrapped by a given
TopicConnectionFactory
.
cnxFact
- The TopicConnectionFactory to use for connecting.name
- Administrator's name.password
- Administrator's password.
AdminException
- If the administrator identification is
incorrect.
disconnect
public static void disconnect()
Closes the administration connection.
doRequest
public static AdminReply doRequest(AdminRequest request)
throws AdminException,
ConnectException
Method actually sending an AdminRequest
instance to
the platform and getting an AdminReply
instance.
AdminException
- If the platform's reply is invalid, or if
the request failed.
getDefaultDMQ
public static DeadMQueue getDefaultDMQ()
throws ConnectException,
AdminException
Returns the default dead message queue for the local server, null if not
set.
AdminException
- Never thrown.
getDefaultDMQ
public static DeadMQueue getDefaultDMQ(int serverId)
throws ConnectException,
AdminException
Returns the default dead message queue for a given server, null if not
set.
The request fails if the target server does not belong to the platform.
AdminException
- If the request fails.
getDefaultThreshold
public static int getDefaultThreshold()
throws ConnectException,
AdminException
Returns the default threshold value for the local server, -1 if not set.
AdminException
- Never thrown.
getDefaultThreshold
public static int getDefaultThreshold(int serverId)
throws ConnectException,
AdminException
Returns the default threshold value for a given server, -1 if not set.
The request fails if the target server does not belong to the platform.
AdminException
- If the request fails.
getDestinations
public static List getDestinations()
throws ConnectException,
AdminException
Returns the list of all destinations that exist on the local server,
or an empty list if none exist.
AdminException
- Never thrown.
getDestinations
public static List getDestinations(int serverId)
throws ConnectException,
AdminException
Returns the list of all destinations that exist on a given server,
or an empty list if none exist.
The request fails if the target server does not belong to the platform.
AdminException
- If the request fails.
getLocalHost
public static String getLocalHost()
throws ConnectException
Returns the host name of the server the module is connected to.
getLocalPort
public static int getLocalPort()
throws ConnectException
Returns the port number of the server the module is connected to.
getLocalServer
public static int getLocalServer()
throws ConnectException
Returns the identifier of the server the module is connected to.
getServersIds
public static List getServersIds()
throws ConnectException,
AdminException
Returns the list of the platform's servers' identifiers.
AdminException
- Never thrown.
getUsers
public static List getUsers()
throws ConnectException,
AdminException
Returns the list of all users that exist on the local server, or an empty
list if none exist.
AdminException
- Never thrown.
getUsers
public static List getUsers(int serverId)
throws ConnectException,
AdminException
Returns the list of all users that exist on a given server, or an empty
list if none exist.
The request fails if the target server does not belong to the platform.
AdminException
- If the request fails.
setDefaultDMQ
public static void setDefaultDMQ(int serverId,
DeadMQueue dmq)
throws ConnectException,
AdminException
Sets a given dead message queue as the default DMQ for a given server
(
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.
AdminException
- If the request fails.
setDefaultDMQ
public static void setDefaultDMQ(DeadMQueue dmq)
throws ConnectException,
AdminException
Sets a given dead message queue as the default DMQ for the local server
(null
for unsetting previous DMQ).
dmq
- The dmq to be set as the default one.
AdminException
- Never thrown.
setDefaultThreshold
public static void setDefaultThreshold(int threshold)
throws ConnectException,
AdminException
Sets a given value as the default threshold for the local server (-1 for
unsetting previous value).
threshold
- The threshold value to be set.
AdminException
- Never thrown.
setDefaultThreshold
public static void setDefaultThreshold(int serverId,
int threshold)
throws ConnectException,
AdminException
Sets a given value as the default threshold for a given server (-1 for
unsetting previous value).
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.
AdminException
- If the request fails.
stopServer
public static void stopServer()
throws ConnectException,
AdminException
Stops the platform local server.
AdminException
- Never thrown.
stopServer
public static void stopServer(int serverId)
throws ConnectException,
AdminException
Stops a given server of the platform.
The request fails if the target server does not belong to the platform.
serverId
- Identifier of the server to stop.
AdminException
- If the request fails.