|
||||||||||
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
public final class 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.
The AdminModule
class uses a unique static connection to
the Joram server, the connection is opened through connect method and
closed by calling disconnect.
AdminWrapper
Field Summary | |
---|---|
static java.lang.String |
ADM_NAME_PROPERTY
|
static java.lang.String |
DEFAULT_ADM_NAME
|
protected static java.lang.String |
localHost
The host name or IP address of the server the module is connected to. |
protected static int |
localPort
The port number of the client connection. |
static org.objectweb.util.monolog.api.Logger |
logger
|
Constructor Summary | |
---|---|
AdminModule()
|
Method Summary | |
---|---|
static void |
abortRequest()
|
static void |
addDomain(java.lang.String domain,
int sid,
int port)
Adds a domain to the platform. |
static void |
addDomain(java.lang.String domain,
java.lang.String network,
int sid,
int port)
Adds a domain to the platform using a specific network component. |
static void |
addServer(int sid,
java.lang.String host,
java.lang.String domain,
int port,
java.lang.String server)
Adds a server to the platform. |
static void |
addServer(int sid,
java.lang.String host,
java.lang.String domain,
int port,
java.lang.String server,
java.lang.String[] services,
java.lang.String[] args)
Adds a server to the platform. |
static void |
collocatedConnect()
Opens a connection with the collocated Joram server. |
static void |
collocatedConnect(java.lang.String name,
java.lang.String password)
Opens a connection with the collocated JORAM server. |
static void |
collocatedConnect(java.lang.String name,
java.lang.String password,
java.lang.String identityClass)
Deprecated. Next to Joram 5.2 use connect methods with ConnectionFactory. |
static void |
connect()
Opens a TCP connection with the Joram server running on the default "localhost" host and listening to the default 16010 port. |
static void |
connect(javax.jms.ConnectionFactory cf)
Opens a connection dedicated to administering with the Joram server which parameters are wrapped by a given ConnectionFactory . |
static void |
connect(javax.jms.ConnectionFactory cf,
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 ConnectionFactory . |
static void |
connect(javax.jms.ConnectionFactory cf,
java.lang.String name,
java.lang.String password,
java.lang.String identityClass)
Opens a connection dedicated to administering with the Joram server which parameters are wrapped by a given ConnectionFactory . |
static void |
connect(java.lang.String host,
int port,
java.lang.String name,
java.lang.String password)
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 host,
int port,
java.lang.String name,
java.lang.String password,
int cnxTimer)
Deprecated. Next to Joram 5.2 use connect methods with ConnectionFactory. |
static void |
connect(java.lang.String host,
int port,
java.lang.String name,
java.lang.String password,
int cnxTimer,
java.lang.String reliableClass)
Deprecated. Next to Joram 5.2 use connect methods with ConnectionFactory. |
static void |
connect(java.lang.String host,
int port,
java.lang.String name,
java.lang.String password,
int cnxTimer,
java.lang.String reliableClass,
java.lang.String identityClass)
Deprecated. Next to Joram 5.2 use connect methods with ConnectionFactory. |
static void |
connect(java.lang.String name,
java.lang.String password)
Opens a TCP connection with the Joram server running on the default "localhost" host and listening to the default 16010 port. |
static void |
connect(java.lang.String name,
java.lang.String password,
int cnxTimer)
Deprecated. Next to Joram 5.2 use connect methods with ConnectionFactory. |
static void |
connect(java.lang.String name,
java.lang.String password,
int cnxTimer,
java.lang.String reliableClass)
Deprecated. Next to Joram 5.2 use connect methods with ConnectionFactory. |
static void |
connect(javax.jms.TopicConnectionFactory cf,
java.lang.String name,
java.lang.String password)
Deprecated. No longer use TopicConnectionFactory next to Joram 5.2. |
static void |
connect(javax.jms.TopicConnectionFactory cf,
java.lang.String name,
java.lang.String password,
java.lang.String identityClass)
Deprecated. No longer use TopicConnectionFactory next to Joram 5.2. |
static Destination |
createQueue(int serverId,
java.lang.String name,
java.lang.String className,
java.util.Properties prop)
Creates or retrieves a queue destination on a given JORAM server. |
static Destination |
createTopic(int serverId,
java.lang.String name,
java.lang.String className,
java.util.Properties prop)
Creates or retrieves a topic destination on a given JORAM server. |
static User |
createUser(java.lang.String name,
java.lang.String password,
int serverId,
java.lang.String identityClassName)
Admin method creating a user for a given server and instantiating the corresponding User object. |
static void |
disconnect()
Closes the administration connection. |
static void |
doCollocatedConnect(java.lang.String name,
java.lang.String password,
java.lang.String identityClass)
Opens a connection with the collocated JORAM server. |
static AdminReply |
doRequest(AdminRequest request)
Deprecated. |
static void |
executeAdmin(java.io.Reader reader)
|
static void |
executeXMLAdmin(java.lang.String path)
This method execute the XML script file that the pathname is given in parameter. |
static void |
executeXMLAdmin(java.lang.String cfgDir,
java.lang.String cfgFileName)
This method execute the XML script file that the location is given in parameter. |
static void |
exportRepositoryToFile(java.lang.String exportDir,
java.lang.String exportFilename)
Export the repository content to an XML file - only the destinations objects are retrieved in this version - xml script format of the admin objects (joramAdmin.xml) |
static java.lang.String |
getConfiguration()
Returns the current servers configuration (a3servers.xml). |
static Queue |
getDefaultDMQ()
Returns the default dead message queue for the local server, null if not set. |
static Queue |
getDefaultDMQ(int serverId)
Returns the default dead message queue for a given server, null if not set. |
static java.lang.String |
getDefaultDMQId()
Returns the default dead message queue for the local server, null if not set. |
static java.lang.String |
getDefaultDMQId(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 Destination[] |
getDestinations()
Returns the list of all destinations that exist on the local server, or null if none exist. |
static Destination[] |
getDestinations(int serverId)
Returns the list of all destinations that exist on a given server, or null if none exist. |
static java.util.List |
getDestinationsList()
Deprecated. No longer supported next to Joram 5.2 |
static java.util.List |
getDestinationsList(int serverId)
Deprecated. No longer supported next to Joram 5.2 |
static java.lang.String[] |
getDomainNames(int serverId)
Returns the list of the domain names that contains the specified server. |
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 Server |
getLocalServer()
|
static int |
getLocalServerId()
Returns the identifier of the server the module is connected to. |
static Server[] |
getServers()
|
static Server[] |
getServers(java.lang.String domain)
Returns the list of the servers' that belong to the specified domain |
static java.util.List |
getServersIds()
Deprecated. No longer supported next to Joram 5.2 |
static java.util.List |
getServersIds(java.lang.String domain)
Deprecated. No longer supported next to Joram 5.2 |
static java.util.Hashtable |
getStatistics()
Returns statistics for the local server. |
static java.util.Hashtable |
getStatistics(int serverId)
Returns statistics for the the specified server. |
static long |
getTimeOutToAbortRequest()
Gets the timeout before abortion of administration requests. |
static User[] |
getUsers()
Returns the list of all users that exist on the local server, or null if none exist. |
static User[] |
getUsers(int serverId)
Returns the list of all users that exist on a given server, or null if none exist. |
static java.util.List |
getUsersList()
Deprecated. No longer supported next to Joram 5.2 |
static java.util.List |
getUsersList(int serverId)
Deprecated. No longer supported next to Joram 5.2 |
static AdminWrapper |
getWrapper()
Returns the administration wrapper. |
static void |
main(java.lang.String[] args)
This method execute the XML script file that the path is given in parameter. |
static AdminReply |
processAdmin(java.lang.String targetId,
int command,
java.util.Properties prop)
The method send the admin JMS message on JORAM server (AdminTopic). |
static void |
removeDomain(java.lang.String domain)
Removes a domain from the platform. |
static void |
removeServer(int sid)
Removes a server from the platform. |
static void |
setDefaultDMQ(int serverId,
Queue dmq)
Sets a given dead message queue as the default DMQ for a given server ( null for unsetting previous DMQ). |
static void |
setDefaultDMQ(Queue dmq)
Sets a given dead message queue as the default DMQ for the local server ( null for unsetting previous DMQ). |
static void |
setDefaultDMQId(int serverId,
java.lang.String dmqId)
Sets a given dead message queue as the default DMQ for a given server ( null for unsetting previous DMQ). |
static void |
setDefaultDMQId(java.lang.String dmqId)
Sets a given dead message queue as the default DMQ for the local 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 |
setHa(boolean isHa)
Deprecated. Only connect method with connection factory must be used with HA servers. |
static void |
setTimeOutToAbortRequest(long timeOut)
Sets the timeout before abortion of administration requests. |
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 |
---|
public static final java.lang.String ADM_NAME_PROPERTY
public static final java.lang.String DEFAULT_ADM_NAME
protected static java.lang.String localHost
protected static int localPort
public static org.objectweb.util.monolog.api.Logger logger
Constructor Detail |
---|
public AdminModule()
Method Detail |
---|
public static AdminWrapper getWrapper() throws java.net.ConnectException
java.net.ConnectException
- if no wrapper is defined.public static void setHa(boolean isHa)
isHa
- public static void main(java.lang.String[] args)
public static void connect(javax.jms.ConnectionFactory cf) throws java.net.ConnectException, AdminException
ConnectionFactory
.
Default administrator login name and password are used for connection
as defined in AbstractConnectionFactory.getDefaultRootLogin()
and AbstractConnectionFactory.getDefaultRootPassword()
.
cf
- The Joram's ConnectionFactory to use for connecting.
java.net.ConnectException
- If connecting fails.
AdminException
- If the administrator identification is incorrect.
java.lang.ClassCastException
- If the ConnectionFactory is not a Joram ConnectionFactory.public static void connect(javax.jms.ConnectionFactory cf, java.lang.String name, java.lang.String password) throws java.net.ConnectException, AdminException
ConnectionFactory
.
cf
- The Joram's ConnectionFactory 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.
java.lang.ClassCastException
- If the ConnectionFactory is not a Joram ConnectionFactory.public static void connect(javax.jms.ConnectionFactory cf, java.lang.String name, java.lang.String password, java.lang.String identityClass) throws java.net.ConnectException, AdminException
ConnectionFactory
.
cf
- The Joram's ConnectionFactory to use for connecting.name
- Administrator's name.password
- Administrator's password.identityClass
- identity class name.
java.net.ConnectException
- If connecting fails.
AdminException
- If the administrator identification is incorrect.
java.lang.ClassCastException
- If the ConnectionFactory is not a Joram ConnectionFactory.public static void connect(javax.jms.TopicConnectionFactory cf, java.lang.String name, java.lang.String password) throws java.net.ConnectException, AdminException
TopicConnectionFactory
.
cf
- 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.
java.lang.ClassCastException
- If the ConnectionFactory is not a Joram ConnectionFactory.public static void connect(javax.jms.TopicConnectionFactory cf, java.lang.String name, java.lang.String password, java.lang.String identityClass) throws java.net.ConnectException, AdminException
TopicConnectionFactory
.
cf
- The TopicConnectionFactory to use for connecting.name
- Administrator's name.password
- Administrator's password.identityClass
- identity class name.
java.net.ConnectException
- If connecting fails.
AdminException
- If the administrator identification is incorrect.
java.lang.ClassCastException
- If the ConnectionFactory is not a Joram ConnectionFactory.public static void connect() throws java.net.UnknownHostException, java.net.ConnectException, AdminException
AbstractConnectionFactory.getDefaultRootLogin()
and AbstractConnectionFactory.getDefaultRootPassword()
.
java.net.UnknownHostException
- Never thrown.
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) throws java.net.UnknownHostException, java.net.ConnectException, AdminException
name
- Administrator's name.password
- Administrator's password.
java.net.UnknownHostException
- Never thrown.
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 connect(java.lang.String host, int port, java.lang.String name, java.lang.String password) throws java.net.UnknownHostException, java.net.ConnectException, AdminException
host
- The name or IP address of the host the server is running on.port
- The number of the port the server is listening to.name
- Administrator's name.password
- Administrator's password.
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 host, int port, java.lang.String name, java.lang.String password, int cnxTimer) throws java.net.UnknownHostException, java.net.ConnectException, AdminException
host
- The name or IP address of the host the server is running on.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, java.lang.String reliableClass) 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.reliableClass
- Reliable class name.
java.net.UnknownHostException
- Never thrown.
java.net.ConnectException
- If connecting fails.
AdminException
- If the administrator identification is
incorrect.public static void connect(java.lang.String host, int port, java.lang.String name, java.lang.String password, int cnxTimer, java.lang.String reliableClass) throws java.net.UnknownHostException, java.net.ConnectException, AdminException
host
- The name or IP address of the host the server is running on.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.reliableClass
- Reliable class name.
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 host, int port, java.lang.String name, java.lang.String password, int cnxTimer, java.lang.String reliableClass, java.lang.String identityClass) throws java.net.UnknownHostException, java.net.ConnectException, AdminException
host
- The name or IP address of the host the server is running on.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.reliableClass
- Reliable class name.identityClass
- identity class name.
java.net.UnknownHostException
- If the host is invalid.
java.net.ConnectException
- If connecting fails.
AdminException
- If the administrator identification is
incorrect.public static void collocatedConnect() throws java.net.ConnectException, AdminException
Default administrator login name and password are used for connection
as defined in AbstractConnectionFactory.getDefaultRootLogin()
and AbstractConnectionFactory.getDefaultRootPassword()
.
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 collocatedConnect(java.lang.String name, java.lang.String password, java.lang.String identityClass) throws java.net.ConnectException, AdminException
name
- Administrator's name.password
- Administrator's password.identityClass
- identity class name.
java.net.ConnectException
- If connecting fails.
AdminException
- If the administrator identification is incorrect.public static void doCollocatedConnect(java.lang.String name, java.lang.String password, java.lang.String identityClass) throws java.net.ConnectException, AdminException
name
- Administrator's name.password
- Administrator's password.identityClass
- identity class name.
java.net.ConnectException
- If connecting fails.
AdminException
- If the administrator identification is incorrect.public static AdminReply doRequest(AdminRequest request) throws AdminException, java.net.ConnectException
AdminRequest
instance to
the platform and getting an AdminReply
instance.
request
- the administration request to send
java.net.ConnectException
- If the connection to the platform fails.
AdminException
- If the platform's reply is invalid, or if
the request failed.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 addServer(int sid, java.lang.String host, java.lang.String domain, int port, java.lang.String server) throws java.net.ConnectException, AdminException
sid
- Id of the added serverhost
- Address of the host where the added server is starteddomain
- Name of the domain where the server is addedport
- Listening port of the server in the specified domainserver
- Name of the added server
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static void addServer(int sid, java.lang.String host, java.lang.String domain, int port, java.lang.String server, java.lang.String[] services, java.lang.String[] args) throws java.net.ConnectException, AdminException
sid
- Id of the added serverhost
- Address of the host where the added server is starteddomain
- Name of the domain where the server is addedport
- Listening port of the server in the specified domainserver
- Name of the added serverservices
- Names of the service to start within the serverargs
- Services' arguments
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static void removeServer(int sid) throws java.net.ConnectException, AdminException
sid
- Id of the removed server
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static void addDomain(java.lang.String domain, int sid, int port) throws java.net.ConnectException, AdminException
domain
- Name of the added domain.sid
- Id of the router server that gives access to the added domain.port
- Listening port in the added domain of the router server.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static void addDomain(java.lang.String domain, java.lang.String network, int sid, int port) throws java.net.ConnectException, AdminException
domain
- Name of the added domain.network
- Classname of the network component to use.sid
- Id of the router server that gives access to the added domain.port
- Listening port in the added domain of the router server.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static void removeDomain(java.lang.String domain) throws java.net.ConnectException, AdminException
domain
- Name of the added domain
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static java.lang.String getConfiguration() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static java.util.Hashtable getStatistics() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.getStatistics(int)
public static java.util.Hashtable getStatistics(int serverId) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform.
serverId
- Unique identifier of the server.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static Queue getDefaultDMQ() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static Queue getDefaultDMQ(int serverId) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform.
serverId
- Unique identifier of the server.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static void setDefaultDMQ(Queue 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 setDefaultDMQ(int serverId, Queue 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 java.lang.String getDefaultDMQId() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static java.lang.String getDefaultDMQId(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 void setDefaultDMQId(java.lang.String dmqId) throws java.net.ConnectException, AdminException
null
for unsetting previous DMQ).
dmqId
- The dmqId (AgentId) to be set as the default one.
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static void setDefaultDMQId(int serverId, java.lang.String dmqId) 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.dmqId
- The dmqId (AgentId) to be set as the default one.
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 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 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 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 java.util.List getServersIds() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static java.util.List getServersIds(java.lang.String domain) throws java.net.ConnectException, AdminException
domain
- Name of the domain.
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static Server[] getServers() throws java.net.ConnectException, AdminException
java.net.ConnectException
AdminException
public static Server[] getServers(java.lang.String domain) throws java.net.ConnectException, AdminException
domain
- Name of the domain.
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static java.lang.String[] getDomainNames(int serverId) throws java.net.ConnectException, AdminException
serverId
- Unique identifier of the server.
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static java.util.List getDestinationsList() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- Never thrown.public static java.util.List getDestinationsList(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 Destination[] getDestinations() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- Never thrown.public static Destination[] getDestinations(int serverId) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform.
serverId
- The unique identifier of the selected server.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.public static Destination createQueue(int serverId, java.lang.String name, java.lang.String className, java.util.Properties prop) throws java.net.ConnectException, AdminException
serverId
- The identifier of the server where deploying the queue.name
- The name of the queue.className
- The queue class name.prop
- The queue properties.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.AdminWrapper.createQueue(int, String, String, Properties)
public static Destination createTopic(int serverId, java.lang.String name, java.lang.String className, java.util.Properties prop) throws java.net.ConnectException, AdminException
serverId
- The identifier of the server where deploying the topic.name
- The name of the topic.className
- The topic class name.prop
- The topic properties.
java.net.ConnectException
- If the admin connection is closed or broken.
AdminException
- If the request fails.AdminWrapper.createTopic(int, String, String, Properties)
public static java.util.List getUsersList() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static java.util.List getUsersList(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 User[] getUsers() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the connection fails.
AdminException
- Never thrown.public static User[] getUsers(int serverId) throws java.net.ConnectException, AdminException
The request fails if the target server does not belong to the platform.
serverId
- Unique identifier of the given server.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.public static Server getLocalServer() throws java.net.ConnectException, AdminException
java.net.ConnectException
AdminException
public static User createUser(java.lang.String name, java.lang.String password, int serverId, java.lang.String identityClassName) throws java.net.ConnectException, AdminException
User
object.
name
- Name of the user.password
- Password of the user.serverId
- The identifier of the user's server.identityClassName
- By default user/password for SimpleIdentity.
java.net.ConnectException
- If the connection fails.
AdminException
- If the request fails.AdminWrapper.createUser(String, String, int, String)
public static int getLocalServerId() throws java.net.ConnectException, AdminException
java.net.ConnectException
- If the admin connection is not established.
AdminException
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 void abortRequest() throws java.net.ConnectException
java.net.ConnectException
public static void executeXMLAdmin(java.lang.String cfgDir, java.lang.String cfgFileName) throws java.lang.Exception
cfgDir
- The directory containing the file.cfgFileName
- The script filename.
java.lang.Exception
public static void executeXMLAdmin(java.lang.String path) throws java.lang.Exception
path
- The script pathname.
java.lang.Exception
public static void executeAdmin(java.io.Reader reader) throws java.lang.Exception
java.lang.Exception
public static void exportRepositoryToFile(java.lang.String exportDir, java.lang.String exportFilename) throws AdminException
exportDir
- target directory where the export file will be putexportFilename
- filename of the export file
AdminException
- if an error occurspublic static void setTimeOutToAbortRequest(long timeOut) throws java.net.ConnectException
Be careful, the value can be changed prior to the connection only using
the AdminRequestor.REQUEST_TIMEOUT_PROP
property.
timeOut
- The timeout
java.net.ConnectException
- if the connection is not established.public static long getTimeOutToAbortRequest() throws java.net.ConnectException
java.net.ConnectException
- if the connection is not established.public static AdminReply processAdmin(java.lang.String targetId, int command, java.util.Properties prop) throws java.net.ConnectException, AdminException
targetId
- agent Id target.command
- the command to execute.prop
- the properties.
AdminException
java.net.ConnectException
- If the connection fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |