public interface JoramAdminMBean
Modifier and Type | Method and Description |
---|---|
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.
|
void |
addServer(int sid,
String host,
String domain,
int port,
String server)
Adds a server to the platform.
|
void |
executeXMLAdmin(String path)
This method execute the XML script file that the pathname is given
in parameter.
|
void |
executeXMLAdmin(String cfgDir,
String cfgFileName)
This method execute the XML script file that the location is given
in parameter.
|
void |
exit()
Closes the administration connection and unregister the MBean.
|
void |
exportRepositoryToFile(String exportDir,
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)
|
void |
getAllDestinations(int serverId)
This method creates and registers MBeans for all the destinations of
the selected server.
|
void |
getAllUsers(int serverId)
This method creates and registers MBeans for all the users of
the selected server.
|
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 the local
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.
|
String[] |
getDomainNames(int serverId)
Returns the list of the domain names that contains the specified server.
|
void |
getLocalDestinations()
This method creates and registers MBeans for all the destinations on
the local server.
|
void |
getLocalUsers()
This method creates and registers MBeans for all the users on
the local server.
|
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
|
long |
getTimeOutToAbortRequest()
Gets the maximum time a command has to complete before it is canceled.
|
AdminReply |
processAdmin(String targetId,
int command,
Properties prop)
The method send the admin JMS message on JORAM server (AdminTopic).
|
void |
queueCreate(int serverId,
String name)
Creates or retrieves a queue destination on the underlying JORAM server,
(re)binds the corresponding
Queue instance. |
void |
queueCreate(String name)
Creates or retrieves a queue destination on the underlying JORAM server,
(re)binds the corresponding
Queue instance. |
void |
removeDomain(String domain)
Removes a domain from the platform.
|
void |
removeServer(int sid)
Removes a server from the platform.
|
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)
Specifies how much time a command has to complete before If the command
does not complete within the specified time, it is canceled and an exception
is generated.
|
void |
stopServer()
Stops the platform local server.
|
void |
stopServer(int serverId)
Stops a given server of the platform.
|
void |
topicCreate(int serverId,
String name)
Creates or retrieves a topic destination on the underlying JORAM server,
(re)binds the corresponding
Topic instance. |
void |
topicCreate(String name)
Creates or retrieves a topic destination on the underlying JORAM server,
(re)binds the corresponding
Topic instance. |
void |
userCreate(String name,
String password)
Creates or retrieves a user on the underlying JORAM server.
|
void |
userCreate(String name,
String password,
int serverId)
Creates or retrieves a user on the given JORAM server.
|
void |
userCreate(String name,
String password,
int serverId,
String identityClass)
Creates or retrieves a user on the underlying JORAM server.
|
void |
userCreate(String name,
String password,
String identityClass)
Creates or retrieves a user on the underlying JORAM server.
|
void exit()
void setTimeOutToAbortRequest(long timeOut) throws ConnectException
timeOut
- the maximum time before a command is canceled.ConnectException
- A problem occurs during connection.long getTimeOutToAbortRequest() throws ConnectException
ConnectException
- A problem occurs during connection.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.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.int[] getServersIds() throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- Never thrown.getServersIds(String)
int[] getServersIds(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.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(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.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)
String getDefaultDMQId() throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- Never thrown.getDefaultDMQId(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.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)
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.int getDefaultThreshold() throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- Never thrown.getDefaultThreshold(int)
void getLocalDestinations() throws ConnectException, AdminException
ConnectException
- If the connection is closed or broken.AdminException
- Never thrown.getAllDestinations(int)
void getAllDestinations(int serverId) throws ConnectException, AdminException
The request fails if the target server does not belong to the platform.
ConnectException
- If the connection is closed or broken.AdminException
- Never thrown.getLocalDestinations()
void queueCreate(String name) throws AdminException, ConnectException
Queue
instance.name
- The name of the queue.AdminException
- If the creation fails.ConnectException
- if the connection is closed or brokenqueueCreate(int, String)
void queueCreate(int serverId, String name) throws AdminException, ConnectException
Queue
instance.serverId
- The identifier of the server where deploying the queue.name
- The name of the queue.AdminException
- If the creation fails.ConnectException
- if the connection is closed or brokenvoid topicCreate(String name) throws AdminException, ConnectException
Topic
instance.name
- The name of the topic.AdminException
- If the creation fails.ConnectException
- if the connection is closed or brokentopicCreate(int, String)
void topicCreate(int serverId, String name) throws AdminException, ConnectException
Topic
instance.serverId
- The identifier of the server where deploying the topic.name
- The name of the topic.AdminException
- If the creation fails.ConnectException
- if the connection is closed or brokenvoid getLocalUsers() throws ConnectException, AdminException
ConnectException
- If the connection fails.AdminException
- Never thrown.getAllUsers(int)
void getAllUsers(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.void userCreate(String name, String password) throws AdminException, ConnectException
name
- The login name of the user.password
- The password of the user.AdminException
- If the creation fails.ConnectException
- If the connection fails.userCreate(String, String, int, String)
void userCreate(String name, String password, String identityClass) throws AdminException, ConnectException
name
- The login name of the user.password
- The password of the user.identityClass
- The identity class used for authentication.AdminException
- If the creation fails.ConnectException
- If the connection fails.userCreate(String, String, int, String)
void userCreate(String name, String password, int serverId) throws AdminException, ConnectException
name
- The login name of the user.password
- The password of the user.serverId
- The unique identifier of the Joram server.AdminException
- If the creation fails.ConnectException
- If the connection fails.userCreate(String, String, int, String)
void userCreate(String name, String password, int serverId, String identityClass) throws ConnectException, AdminException
name
- The login name of the user.password
- The password of the user.serverId
- The unique identifier of the Joram server.identityClass
- The identity class used for authentication.AdminException
- If the creation fails.ConnectException
- If the connection fails.void exportRepositoryToFile(String exportDir, String exportFilename) throws AdminException
exportDir
- target directory where the export file will be putexportFilename
- filename of the export fileAdminException
- if an error occursvoid executeXMLAdmin(String cfgDir, String cfgFileName) throws Exception
Be careful, currently this method use the static administration connection through the AdminModule Class.
cfgDir
- The directory containing the file.cfgFileName
- The script filename.Exception
void executeXMLAdmin(String path) throws Exception
Be careful, currently this method use the static administration connection through the AdminModule Class.
path
- The script pathname.Exception
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.Copyright © 2023 ScalAgent D.T.. All rights reserved.