public interface AdminItf
AdminItf
interface defines the set of methods needed
for administration and monitoring of the Joram platform.Modifier and Type | Method and Description |
---|---|
void |
abortRequest() |
String |
addAMQPBridgeConnection(int serverId,
String urls)
Adds an AMQP server and starts a live connection with it, accessible via
the url provided.
|
void |
addDomain(String domain,
int sid,
int port)
Adds a domain to the platform.
|
void |
addDomain(String domain,
String network,
int sid,
int port)
Adds a domain to the platform using a specific network component.
|
String |
addJMSBridgeConnection(int serverId,
String urls)
Adds a JMS server and starts a live connection with it, accessible via
the url provided.
|
void |
addServer(int sid,
String host,
String domain,
int port,
String server)
Adds a server to the platform.
|
void |
addServer(int sid,
String host,
String domain,
int port,
String server,
String[] services,
String[] args)
Adds a server to the platform.
|
void |
close()
Closes the underlying requestor.
|
Destination |
createQueue(int serverId,
String name)
Creates or retrieves a queue destination on a given JORAM server.
|
Destination |
createQueue(int serverId,
String name,
String className,
Properties prop)
Creates or retrieves a queue destination on a given JORAM server.
|
Destination |
createQueue(String name)
Creates or retrieves a queue destination on a given JORAM server.
|
Destination |
createTopic(int serverId,
String name)
Creates or retrieves a topic destination on a given JORAM server.
|
Destination |
createTopic(int serverId,
String name,
String className,
Properties prop)
Creates or retrieves a topic destination on a given JORAM server.
|
Destination |
createTopic(String name)
Creates or retrieves a topic destination on the underlying JORAM server.
|
User |
createUser(String name,
String password)
Creates or retrieves a user on the underlying JORAM server.
|
User |
createUser(String name,
String password,
int serverId)
Creates or retrieves a user on the underlying JORAM server.
|
User |
createUser(String name,
String password,
int serverId,
String identityClassName)
Admin method creating a user for a given server and instantiating the
corresponding
User object. |
User |
createUser(String name,
String password,
int serverId,
String identityClassName,
Properties prop)
Admin method creating a user for a given server and instantiating the
corresponding
User object. |
User |
createUser(String name,
String password,
String identityClass)
Creates or retrieves a user on the underlying JORAM server.
|
String |
deleteAMQPBridgeConnection(int serverId,
String names)
Removes the live connection to the specified AMQP server.
|
String |
deleteJMSPBridgeConnection(int serverId,
String names)
Removes the live connection to the specified AMQP server.
|
AdminReply |
doRequest(AdminRequest request)
Method actually sending an
AdminRequest instance to
the platform and getting an AdminReply instance. |
String |
getConfiguration()
Returns the current servers configuration (a3servers.xml).
|
Queue |
getDefaultDMQ()
Returns the default dead message queue for the local server, null if not
set.
|
Queue |
getDefaultDMQ(int serverId)
Returns the default dead message queue for a given server, null if not set.
|
String |
getDefaultDMQId()
Returns the unique identifier of the default dead message queue for the local
server, null if not set.
|
String |
getDefaultDMQId(int serverId)
Returns the unique identifier of the default dead message queue for a given
server, null if not set.
|
int |
getDefaultThreshold()
Returns the default threshold value for the local server, -1 if not set.
|
int |
getDefaultThreshold(int serverId)
Returns the default threshold value for a given server, -1 if not set.
|
Destination[] |
getDestinations()
Returns the list of all destinations that exist on the local server.
|
Destination[] |
getDestinations(int serverId)
Returns the list of all destinations that exist on a given server.
|
String[] |
getDomainNames(int serverId)
Returns the list of the domain names that contains the specified server.
|
Hashtable |
getJMXAttribute(int serverId,
String attname)
Returns JMX attribute value for the specified server.
|
Hashtable |
getJMXAttribute(String attname)
Returns JMX attribute value for the local server.
|
String |
getLocalHost()
Returns the host name of the server the module is connected to.
|
String |
getLocalName()
Returns the name of the server the module is connected to.
|
Server |
getLocalServer()
Returns the information about the current server: unique identifier, symbolic name and hostname.
|
int |
getLocalServerId()
Returns the identifier of the server the module is connected to.
|
Server[] |
getServers()
Returns the list of the platform's servers' descriptions.
|
Server[] |
getServers(String domain)
Returns the list of the servers' that belong to the specified domain.
|
int[] |
getServersIds()
Returns the list of the platform's servers' identifiers.
|
int[] |
getServersIds(String domain)
Returns the list of the servers' identifiers that belong to the specified domain
|
String[] |
getServersNames()
Returns the list of the platform's servers' names.
|
String[] |
getServersNames(String domain)
Returns the list of the servers' names that belong to the specified domain
|
Hashtable |
getStatistics()
Returns statistics for the local server.
|
Hashtable |
getStatistics(int serverId)
Returns statistics for the the specified server.
|
long |
getTimeOutToAbortRequest()
Returns the maximum time in ms before aborting request.
|
User[] |
getUsers()
Returns the list of all users that exist on the local server.
|
User[] |
getUsers(int serverId)
Returns the list of all users that exist on a given server.
|
String |
invokeStaticServerMethod(int serverId,
String className,
String methodName,
Class<?>[] parameterTypes,
Object[] args)
Invokes the specified static method with the specified parameters on the
chosen server.
|
boolean |
isClosed()
Returns true if the underlying requestor is closed.
|
AdminReply |
processAdmin(String targetId,
int command,
Properties prop)
The method send the admin JMS message on JORAM server (AdminTopic).
|
void |
removeDomain(String domain)
Removes a domain from the platform.
|
void |
removeServer(int sid)
Removes a server from the platform.
|
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). |
void |
setDefaultDMQ(Queue dmq)
Sets a given dead message queue as the default DMQ for the local server
(
null for unsetting previous DMQ). |
void |
setDefaultDMQId(int serverId,
String dmqId)
Sets a given dead message queue as the default DMQ for a given server
(
null for unsetting previous DMQ). |
void |
setDefaultDMQId(String dmqId)
Sets a given dead message queue as the default DMQ for the local server
(
null for unsetting previous DMQ). |
void |
setDefaultThreshold(int threshold)
Sets a given value as the default threshold for the local server (-1 for
unsetting previous value).
|
void |
setDefaultThreshold(int serverId,
int threshold)
Sets a given value as the default threshold for a given server (-1 for
unsetting previous value).
|
void |
setTimeOutToAbortRequest(long timeOut)
Set the maximum time in ms before aborting request.
|
void |
stopServer()
Stops the platform local server.
|
void |
stopServer(int serverId)
Stops a given server of the platform.
|
void setTimeOutToAbortRequest(long timeOut) throws ConnectException
timeOut
- the maximum time in ms before aborting request.ConnectException
- if the connection is not established.long getTimeOutToAbortRequest() throws ConnectException
ConnectException
- if the connection is not established.void close()
boolean isClosed()
void stopServer() throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- If the request fails.stopServer(int)
void stopServer(int serverId) throws ConnectException, AdminException
The request fails if the target server does not belong to the platform.
serverId
- Identifier of the server to stop.ConnectException
- If the connection fails.AdminException
- If the request fails.void addServer(int sid, String host, String domain, int port, String server) throws ConnectException, AdminException
The server is configured without any service.
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 serverConnectException
- If the connection fails.AdminException
- If the request fails.addServer(int, String, String, int, String, String[], String[])
void addServer(int sid, String host, String domain, int port, String server, String[] services, String[] args) throws 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' argumentsConnectException
- If the connection fails.AdminException
- If the request fails.void removeServer(int sid) throws ConnectException, AdminException
sid
- Id of the removed serverConnectException
- If the connection fails.AdminException
- If the request fails.void addDomain(String domain, int sid, int port) throws ConnectException, AdminException
The domain will use the default network component "SimpleNetwork".
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.ConnectException
- If the connection fails.AdminException
- If the request fails.void addDomain(String domain, String network, int sid, int port) throws 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.ConnectException
- If the connection fails.AdminException
- If the request fails.void removeDomain(String domain) throws ConnectException, AdminException
domain
- Name of the domain to removeConnectException
- If the connection fails.AdminException
- If the request fails.String getConfiguration() throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- If the request fails.Hashtable getStatistics() throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- Never thrown.getStatistics(int)
Hashtable getStatistics(int serverId) throws ConnectException, AdminException
The request fails if the target server does not belong to the platform.
serverId
- Unique identifier of the server.ConnectException
- If the connection fails.AdminException
- If the request fails.Hashtable getJMXAttribute(String attname) throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- Never thrown.getStatistics(int)
Hashtable getJMXAttribute(int serverId, String attname) throws ConnectException, AdminException
The request fails if the target server does not belong to the platform.
serverId
- Unique identifier of the server.ConnectException
- If the connection fails.AdminException
- If the request fails.String getDefaultDMQId() throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- Never thrown.getDefaultDMQId(int)
String getDefaultDMQId(int serverId) throws ConnectException, AdminException
The request fails if the target server does not belong to the platform.
serverId
- Unique identifier of the server.ConnectException
- If the connection fails.AdminException
- If the request fails.void setDefaultDMQId(String dmqId) throws ConnectException, AdminException
null
for unsetting previous DMQ).dmqId
- The dmqId (AgentId) to be set as the default one.ConnectException
- If the connection fails.AdminException
- Never thrown.setDefaultDMQId(int, String)
void setDefaultDMQId(int serverId, String dmqId) throws 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.ConnectException
- If the connection fails.AdminException
- If the request fails.Queue getDefaultDMQ() throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- Never thrown.getDefaultDMQ(int)
Queue getDefaultDMQ(int serverId) throws ConnectException, AdminException
The request fails if the target server does not belong to the platform.
serverId
- Unique identifier of the server.ConnectException
- If the connection fails.AdminException
- If the request fails.void setDefaultDMQ(Queue dmq) throws ConnectException, AdminException
null
for unsetting previous DMQ).dmq
- The dmq to be set as the default one.ConnectException
- If the connection fails.AdminException
- Never thrown.setDefaultDMQ(int, Queue)
void setDefaultDMQ(int serverId, Queue dmq) throws 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.ConnectException
- If the connection fails.AdminException
- If the request fails.int getDefaultThreshold() throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- Never thrown.getDefaultThreshold(int)
int getDefaultThreshold(int serverId) throws ConnectException, AdminException
The request fails if the target server does not belong to the platform.
ConnectException
- If the connection fails.AdminException
- If the request fails.void setDefaultThreshold(int threshold) throws ConnectException, AdminException
threshold
- The threshold value to be set.ConnectException
- If the connection fails.AdminException
- Never thrown.setDefaultThreshold(int, int)
void setDefaultThreshold(int serverId, int threshold) throws 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.ConnectException
- If the connection fails.AdminException
- If the request fails.int[] getServersIds() throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- Never thrown.getServers(String)
int[] getServersIds(String domain) throws ConnectException, AdminException
domain
- Name of the domain.ConnectException
- If the connection fails.AdminException
- Never thrown.String[] getServersNames() throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- Never thrown.getServers(String)
String[] getServersNames(String domain) throws ConnectException, AdminException
domain
- Name of the domain.ConnectException
- If the connection fails.AdminException
- Never thrown.Server[] getServers() throws ConnectException, AdminException
ConnectException
AdminException
getServers(String)
Server[] getServers(String domain) throws ConnectException, AdminException
domain
- Name of the domain.ConnectException
- If the connection fails.AdminException
- Never thrown.String[] getDomainNames(int serverId) throws ConnectException, AdminException
serverId
- Unique identifier of the server.ConnectException
- If the connection fails.AdminException
- Never thrown.Destination[] getDestinations() throws ConnectException, AdminException
ConnectException
- If the admin connection is closed or broken.AdminException
- Never thrown.getDestinations(int)
Destination[] getDestinations(int serverId) throws ConnectException, AdminException
The request fails if the target server does not belong to the platform.
serverId
- Unique identifier of the server.ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.Destination createQueue(String name) throws AdminException, ConnectException
name
- The name of the queue.ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.createQueue(int, String, String, Properties)
Destination createQueue(int serverId, String name) throws AdminException, ConnectException
serverId
- The identifier of the server where deploying the topic.name
- The name of the queue.ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.createQueue(int, String, String, Properties)
Destination createQueue(int serverId, String name, String className, Properties prop) throws ConnectException, AdminException
First a destination with the specified name is searched on the given server, if it does not exist it is created.
The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
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.ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.Destination createTopic(String name) throws AdminException, ConnectException
name
- The name of the topic.ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.createTopic(int, String, String, Properties)
Destination createTopic(int serverId, String name) throws AdminException, ConnectException
serverId
- The identifier of the server where deploying the topic.name
- The name of the topic.ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.createTopic(int, String, String, Properties)
Destination createTopic(int serverId, String name, String className, Properties prop) throws ConnectException, AdminException
First a destination with the specified name is searched on the given server, if it does not exist it is created.
The request fails if the target server does not belong to the platform, or if the destination deployment fails server side.
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.ConnectException
- If the admin connection is closed or broken.AdminException
- If the request fails.User[] getUsers() throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- Never thrown.getUsers(int)
User[] getUsers(int serverId) throws ConnectException, AdminException
The request fails if the target server does not belong to the platform.
serverId
- Unique identifier of the given server.ConnectException
- If the connection fails.AdminException
- If the request fails.User createUser(String name, String password) throws ConnectException, AdminException
name
- Name of the user.password
- Password of the user.ConnectException
- If the connection fails.AdminException
- If the request fails.createUser(String, String, int, String)
User createUser(String name, String password, int serverId) throws ConnectException, AdminException
name
- Name of the user.password
- Password of the user.serverId
- The identifier of the user's server.ConnectException
- If the connection fails.AdminException
- If the request fails.createUser(String, String, int, String)
User createUser(String name, String password, String identityClass) throws AdminException, ConnectException
name
- Name of the user.password
- Password of the user.identityClass
- Classname for authentication, by default SimpleIdentity for user/password.ConnectException
- If the connection fails.AdminException
- If the request fails.createUser(String, String, int, String)
User createUser(String name, String password, int serverId, String identityClassName) throws ConnectException, AdminException
User
object.
If the user has already been set on this server, the method simply
returns the corresponding User
object. Its fails if the
target server does not belong to the platform, or if a proxy could not
be deployed server side for a new user.
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.ConnectException
- If the connection fails.AdminException
- If the request fails.User createUser(String name, String password, int serverId, String identityClassName, Properties prop) throws ConnectException, AdminException
User
object.
If the user has already been set on this server, the method simply
returns the corresponding User
object. Its fails if the
target server does not belong to the platform, or if a proxy could not
be deployed server side for a new user.
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.prop
- propertiesConnectException
- If the connection fails.AdminException
- If the request fails.Server getLocalServer() throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- If the request fails.int getLocalServerId() throws ConnectException, AdminException
ConnectException
- If the admin connection is not established.AdminException
- If the request fails.getLocalServer()
String getLocalHost() throws ConnectException, AdminException
ConnectException
- If the admin connection is not established.AdminException
- If the request fails.getLocalServer()
String getLocalName() throws ConnectException, AdminException
ConnectException
- If the admin connection is not established.AdminException
- If the request fails.getLocalServer()
AdminReply processAdmin(String targetId, int command, Properties prop) throws ConnectException, AdminException
targetId
- agent Id target.command
- the command to execute.prop
- the properties.AdminException
ConnectException
- If the connection fails.AdminReply doRequest(AdminRequest request) throws AdminException, ConnectException
AdminRequest
instance to
the platform and getting an AdminReply
instance.request
- the administration request to sendConnectException
- If the connection to the platform fails.AdminException
- If the platform's reply is invalid, or if
the request failed.void abortRequest() throws ConnectException
ConnectException
String invokeStaticServerMethod(int serverId, String className, String methodName, Class<?>[] parameterTypes, Object[] args) throws ConnectException, AdminException
serverId
- the identifier of the server.className
- the name of the class holding the static methodmethodName
- the name of the invoked methodparameterTypes
- the list of parametersargs
- the arguments used for the method callConnectException
- If the connection fails.AdminException
- If the invocation can't be done or failsString addAMQPBridgeConnection(int serverId, String urls) throws ConnectException, AdminException
serverId
- the serverIdurls
- the amqp url list identifying the servers separate by space, for example:
"amqp://user:pass@localhost:5672/?name=serv1 amqp://user:pass@localhost:5678/?name=serv2"ConnectException
- If the connection fails.AdminException
- If the invocation can't be done or failsString deleteAMQPBridgeConnection(int serverId, String names) throws ConnectException, AdminException
serverId
- the serverIdnames
- the name identifying the server or list of name separate by spaceConnectException
- If the connection fails.AdminException
- If the invocation can't be done or failsString addJMSBridgeConnection(int serverId, String urls) throws ConnectException, AdminException
serverId
- the serverIdurls
- the jms url list identifying the servers separate by space, for example:
"jndi_url/?name=cnx1&cf=cfName&jndiFactoryClass=com.xxx.yyy&user=user1&pass=pass1&clientID=clientID"ConnectException
- If the connection fails.AdminException
- If the invocation can't be done or failsString deleteJMSPBridgeConnection(int serverId, String names) throws ConnectException, AdminException
serverId
- the serverIdnames
- the name identifying the server or list of name separate by spaceConnectException
- If the connection fails.AdminException
- If the invocation can't be done or failsCopyright © 2016 ScalAgent D.T.. All Rights Reserved.