public class JoramAdmin extends Object implements AdminItf, JoramAdminMBean
AdminModule,
AdminWrapper| Modifier and Type | Field and Description |
|---|---|
protected String |
JMXBaseName |
static org.objectweb.util.monolog.api.Logger |
logger |
AdminWrapper |
wrapper |
| Constructor and Description |
|---|
JoramAdmin(jakarta.jms.Connection cnx)
Creates a MBean to administer Joram using the default basename for JMX
registering (
JoramAdmin(Connection, String)). |
JoramAdmin(jakarta.jms.Connection cnx,
String base)
Creates a MBean to administer Joram using the given basename for JMX registering.
|
| 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 the underlying JORAM server,
(re)binds the corresponding
Queue instance. |
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 the underlying JORAM server,
(re)binds the corresponding
Queue instance. |
Destination |
createTopic(int serverId,
String name)
Creates or retrieves a topic destination on the underlying JORAM server,
(re)binds the corresponding
Topic instance. |
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,
(re)binds the corresponding
Topic instance. |
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 given JORAM server.
|
User |
createUser(String name,
String password,
int serverId,
String identityClass)
Creates or retrieves a user on the underlying JORAM server.
|
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 |
deleteJMSBridgeConnection(int serverId,
String names)
Removes the live connection to the specified AMQP server.
|
String |
deleteJMSBridgeConnection(int serverId,
String names,
boolean async)
Removes the live connection to the specified JMS server.
|
String |
deleteJMSPBridgeConnection(int serverId,
String names)
Deprecated.
|
String |
deleteJMSPBridgeConnection(int serverId,
String names,
boolean async)
Deprecated.
|
static JoramAdmin |
doCreate(AbstractConnectionFactory cf,
String name,
String password,
String identityClass)
Opens a connection dedicated to administering with the Joram server
which parameters are wrapped by a given
ConnectionFactory. |
org.objectweb.joram.shared.admin.AdminReply |
doRequest(org.objectweb.joram.shared.admin.AdminRequest request)
Method actually sending an
AdminRequest instance to
the platform and getting an AdminReply instance. |
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)
Be careful, currently this method use the static administration connection
through the AdminModule Class.
|
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 |
getConfiguration()
Returns the current servers configuration (equivalent to the a3servers.xml file).
|
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 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.
|
Destination[] |
getDestinations()
This method creates and registers MBeans for all the destinations on
the local server.
|
Destination[] |
getDestinations(int serverId)
This method creates and registers MBeans for all the destinations of
the selected 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 |
getJMXBaseName() |
void |
getLocalDestinations()
This method creates and registers MBeans for all the destinations on
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.
|
void |
getLocalUsers()
This method creates and registers MBeans for all the users on
the local server.
|
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()
Gets the maximum time a command has to complete before it is canceled.
|
User[] |
getUsers()
This method creates and registers MBeans for all the users on
the local server.
|
User[] |
getUsers(int serverId)
This method creates and registers MBeans for all the users of
the selected 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.
|
String |
invokeStaticServerMethod(int serverId,
String className,
String methodName,
Class<?>[] parameterTypes,
Object[] args,
boolean async) |
boolean |
isClosed()
Returns true if the underlying requestor is closed.
|
org.objectweb.joram.shared.admin.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 |
registerMBean(String base) |
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)
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 |
unregisterMBean() |
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.
|
private Destination |
wrapDestination(Destination destination) |
private Destination[] |
wrapDestinations(Destination[] destinations) |
private User |
wrapUser(User user) |
private User[] |
wrapUsers(User[] users) |
public static org.objectweb.util.monolog.api.Logger logger
public AdminWrapper wrapper
protected transient String JMXBaseName
public JoramAdmin(jakarta.jms.Connection cnx)
throws ConnectException,
AdminException,
jakarta.jms.JMSException
JoramAdmin(Connection, String)).
Be careful, if the connection is not started this method will failed with
a ConnectException.cnx - A valid connection to the Joram server.jakarta.jms.JMSException - A problem occurs during initialization.ConnectExceptionAdminExceptionAdminWrapper(Connection)public JoramAdmin(jakarta.jms.Connection cnx,
String base)
throws ConnectException,
AdminException,
jakarta.jms.JMSException
cnx - A valid connection to the Joram server.base - the basename for registering the MBean.jakarta.jms.JMSException - A problem occurs during initialization.ConnectExceptionAdminExceptionAdminWrapper(Connection)public void exit()
exit in interface JoramAdminMBeanpublic void close()
AdminItfpublic boolean isClosed()
AdminItfpublic void setTimeOutToAbortRequest(long timeOut)
throws ConnectException
Be careful, the value can be changed prior to the connection only using
the AdminRequestor.REQUEST_TIMEOUT_PROP property.
setTimeOutToAbortRequest in interface AdminItfsetTimeOutToAbortRequest in interface JoramAdminMBeantimeOut - the maximum time before a command is canceled.ConnectException - if the connection is not established.public long getTimeOutToAbortRequest()
throws ConnectException
getTimeOutToAbortRequest in interface AdminItfgetTimeOutToAbortRequest in interface JoramAdminMBeanConnectException - if the connection is not established.public void stopServer()
throws ConnectException,
AdminException
stopServer in interface AdminItfstopServer in interface JoramAdminMBeanConnectException - If the connection fails.AdminException - If the request fails.stopServer(int)public void stopServer(int serverId)
throws ConnectException,
AdminException
The request fails if the target server does not belong to the platform.
stopServer in interface AdminItfstopServer in interface JoramAdminMBeanserverId - Identifier of the server to stop.ConnectException - If the connection fails.AdminException - If the request fails.public void addServer(int sid,
String host,
String domain,
int port,
String server)
throws ConnectException,
AdminException
The server is configured without any service.
addServer in interface AdminItfaddServer in interface JoramAdminMBeansid - 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.AdminItf.addServer(int, String, String, int, String, String[], String[])public void addServer(int sid,
String host,
String domain,
int port,
String server,
String[] services,
String[] args)
throws ConnectException,
AdminException
AdminItfaddServer in interface AdminItfsid - 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.public void removeServer(int sid)
throws ConnectException,
AdminException
removeServer in interface AdminItfremoveServer in interface JoramAdminMBeansid - Id of the removed serverConnectException - If the connection fails.AdminException - If the request fails.public void addDomain(String domain, int sid, int port) throws ConnectException, AdminException
The domain will use the default network component "Simplenetwork".
addDomain in interface AdminItfaddDomain in interface JoramAdminMBeandomain - 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.public void addDomain(String domain, String network, int sid, int port) throws ConnectException, AdminException
addDomain in interface AdminItfaddDomain in interface JoramAdminMBeandomain - 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.public void removeDomain(String domain) throws ConnectException, AdminException
removeDomain in interface AdminItfremoveDomain in interface JoramAdminMBeandomain - Name of the domain to removeConnectException - If the connection fails.AdminException - If the request fails.public String getConfiguration() throws ConnectException, AdminException
getConfiguration in interface AdminItfConnectException - If the connection fails.AdminException - If the request fails.public int[] getServersIds()
throws ConnectException,
AdminException
getServersIds in interface AdminItfgetServersIds in interface JoramAdminMBeanConnectException - If the connection fails.AdminException - Never thrown.getServersIds(String)public int[] getServersIds(String domain) throws ConnectException, AdminException
getServersIds in interface AdminItfgetServersIds in interface JoramAdminMBeandomain - Name of the domain.ConnectException - If the connection fails.AdminException - Never thrown.public Server[] getServers() throws ConnectException, AdminException
AdminItfgetServers in interface AdminItfConnectExceptionAdminExceptionAdminItf.getServers(String)public Server[] getServers(String domain) throws ConnectException, AdminException
AdminItfgetServers in interface AdminItfdomain - Name of the domain.ConnectException - If the connection fails.AdminException - Never thrown.public String[] getDomainNames(int serverId) throws ConnectException, AdminException
getDomainNames in interface AdminItfgetDomainNames in interface JoramAdminMBeanserverId - Unique identifier of the server.ConnectException - If the connection fails.AdminException - Never thrown.public String getDefaultDMQId() throws ConnectException, AdminException
getDefaultDMQId in interface AdminItfgetDefaultDMQId in interface JoramAdminMBeanConnectException - If the connection fails.AdminException - Never thrown.getDefaultDMQId(int)public String getDefaultDMQId(int serverId) throws ConnectException, AdminException
The request fails if the target server does not belong to the platform.
getDefaultDMQId in interface AdminItfgetDefaultDMQId in interface JoramAdminMBeanserverId - Unique identifier of the server.ConnectException - If the connection fails.AdminException - If the request fails.public void setDefaultDMQId(String dmqId) throws ConnectException, AdminException
null for unsetting previous DMQ).setDefaultDMQId in interface AdminItfsetDefaultDMQId in interface JoramAdminMBeandmqId - The dmqId (AgentId) to be set as the default one.ConnectException - If the connection fails.AdminException - Never thrown.setDefaultDMQId(int, String)public 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.
setDefaultDMQId in interface AdminItfsetDefaultDMQId in interface JoramAdminMBeanserverId - 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.public Queue getDefaultDMQ() throws ConnectException, AdminException
AdminItfgetDefaultDMQ in interface AdminItfConnectException - If the connection fails.AdminException - Never thrown.AdminItf.getDefaultDMQ(int)public Queue getDefaultDMQ(int serverId) throws ConnectException, AdminException
AdminItfThe request fails if the target server does not belong to the platform.
getDefaultDMQ in interface AdminItfserverId - Unique identifier of the server.ConnectException - If the connection fails.AdminException - If the request fails.public void setDefaultDMQ(Queue dmq) throws ConnectException, AdminException
AdminItfnull for unsetting previous DMQ).setDefaultDMQ in interface AdminItfdmq - The dmq to be set as the default one.ConnectException - If the connection fails.AdminException - Never thrown.AdminItf.setDefaultDMQ(int, Queue)public void setDefaultDMQ(int serverId,
Queue dmq)
throws ConnectException,
AdminException
AdminItfnull for unsetting previous DMQ).
The request fails if the target server does not belong to the platform.
setDefaultDMQ in interface AdminItfserverId - 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.public void setDefaultThreshold(int threshold)
throws ConnectException,
AdminException
setDefaultThreshold in interface AdminItfsetDefaultThreshold in interface JoramAdminMBeanthreshold - The threshold value to be set.ConnectException - If the connection fails.AdminException - Never thrown.setDefaultThreshold(int, int)public void setDefaultThreshold(int serverId,
int threshold)
throws ConnectException,
AdminException
The request fails if the target server does not belong to the platform.
setDefaultThreshold in interface AdminItfsetDefaultThreshold in interface JoramAdminMBeanserverId - The identifier of the server.threshold - The threshold value to be set.ConnectException - If the connection fails.AdminException - If the request fails.public int getDefaultThreshold()
throws ConnectException,
AdminException
getDefaultThreshold in interface AdminItfgetDefaultThreshold in interface JoramAdminMBeanConnectException - If the connection fails.AdminException - Never thrown.getDefaultThreshold(int)public int getDefaultThreshold(int serverId)
throws ConnectException,
AdminException
The request fails if the target server does not belong to the platform.
getDefaultThreshold in interface AdminItfgetDefaultThreshold in interface JoramAdminMBeanConnectException - If the connection fails.AdminException - If the request fails.public void getLocalDestinations()
throws ConnectException,
AdminException
getLocalDestinations in interface JoramAdminMBeanConnectException - If the connection is closed or broken.AdminException - Never thrown.getDestinations(int)public Destination[] getDestinations() throws ConnectException, AdminException
getDestinations in interface AdminItfConnectException - If the connection is closed or broken.AdminException - Never thrown.getDestinations(int)public void getAllDestinations(int serverId)
throws ConnectException,
AdminException
The request fails if the target server does not belong to the platform.
getAllDestinations in interface JoramAdminMBeanConnectException - If the connection is closed or broken.AdminException - Never thrown.getDestinations()public Destination[] getDestinations(int serverId) throws ConnectException, AdminException
The request fails if the target server does not belong to the platform.
getDestinations in interface AdminItfserverId - Unique identifier of the server.ConnectException - If the connection is closed or broken.AdminException - Never thrown.getDestinations()private final Destination[] wrapDestinations(Destination[] destinations)
public Destination createQueue(String name) throws AdminException, ConnectException
Queue instance.createQueue in interface AdminItfname - The name of the queue.AdminException - If the creation fails.ConnectException - if the connection is closed or brokencreateQueue(int, String)public Destination createQueue(int serverId, String name) throws AdminException, ConnectException
Queue instance.createQueue in interface AdminItfserverId - 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 brokenAdminItf.createQueue(int, String, String, Properties)public Destination createQueue(int serverId, String name, String className, Properties prop) throws ConnectException, AdminException
AdminItfFirst 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.
createQueue in interface AdminItfserverId - 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.public Destination createTopic(String name) throws AdminException, ConnectException
Topic instance.createTopic in interface AdminItfname - The name of the topic.AdminException - If the creation fails.ConnectException - if the connection is closed or brokencreateTopic(int, String)public Destination createTopic(int serverId, String name) throws AdminException, ConnectException
Topic instance.createTopic in interface AdminItfserverId - 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 brokenAdminItf.createTopic(int, String, String, Properties)public Destination createTopic(int serverId, String name, String className, Properties prop) throws ConnectException, AdminException
AdminItfFirst 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.
createTopic in interface AdminItfserverId - 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.private final Destination wrapDestination(Destination destination)
public User[] getUsers() throws ConnectException, AdminException
getUsers in interface AdminItfConnectException - If the connection fails.AdminException - Never thrown.getUsers(int)public User[] getUsers(int serverId) throws ConnectException, AdminException
The request fails if the target server does not belong to the platform.
getUsers in interface AdminItfserverId - Unique identifier of the given server.ConnectException - If the connection fails.AdminException - If the request fails.public User createUser(String name, String password) throws AdminException, ConnectException
createUser in interface AdminItfname - The login name of the user.password - The password of the user.AdminException - If the creation fails.ConnectException - If the connection fails.createUser(String, String, int, String)public User createUser(String name, String password, String identityClass) throws AdminException, ConnectException
createUser in interface AdminItfname - 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.createUser(String, String, int, String)public User createUser(String name, String password, int serverId) throws AdminException, ConnectException
createUser in interface AdminItfname - 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.createUser(String, String, int, String)public User createUser(String name, String password, int serverId, String identityClass) throws ConnectException, AdminException
createUser in interface AdminItfname - 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.public User createUser(String name, String password, int serverId, String identityClassName, Properties prop) throws ConnectException, AdminException
AdminItfUser 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.
createUser in interface AdminItfname - 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.public String getJMXBaseName()
public void registerMBean(String base)
public void unregisterMBean()
public static JoramAdmin doCreate(AbstractConnectionFactory cf, String name, String password, String identityClass) throws ConnectException, AdminException
ConnectionFactory.cf - The Joram's ConnectionFactory to use for connecting.name - Administrator's name.password - Administrator's password.identityClass - identity class name.ConnectException - If connecting fails.AdminException - If the administrator identification is incorrect.public void executeXMLAdmin(String cfgDir, String cfgFileName) throws Exception
Be careful, currently this method use the static administration connection through the AdminModule Class.
executeXMLAdmin in interface JoramAdminMBeancfgDir - The directory containing the file.cfgFileName - The script filename.Exceptionpublic void executeXMLAdmin(String path) throws Exception
Be careful, currently this method use the static administration connection through the AdminModule Class.
executeXMLAdmin in interface JoramAdminMBeanpath - The script pathname.Exceptionpublic void exportRepositoryToFile(String exportDir, String exportFilename) throws AdminException
Be careful, currently this method use the static administration connection through the AdminModule Class.
exportRepositoryToFile in interface JoramAdminMBeanexportDir - target directory where the export file will be putexportFilename - filename of the export fileAdminException - if an error occurspublic org.objectweb.joram.shared.admin.AdminReply processAdmin(String targetId, int command, Properties prop) throws ConnectException, AdminException
processAdmin in interface AdminItfprocessAdmin in interface JoramAdminMBeantargetId - agent Id target.command - the command to execute.prop - the properties.AdminExceptionConnectException - If the connection fails.public void queueCreate(String name) throws AdminException, ConnectException
JoramAdminMBeanQueue instance.queueCreate in interface JoramAdminMBeanname - The name of the queue.AdminException - If the creation fails.ConnectException - if the connection is closed or brokenJoramAdminMBean.queueCreate(int, String)public void queueCreate(int serverId,
String name)
throws AdminException,
ConnectException
JoramAdminMBeanQueue instance.queueCreate in interface JoramAdminMBeanserverId - 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 brokenpublic void topicCreate(String name) throws AdminException, ConnectException
JoramAdminMBeanTopic instance.topicCreate in interface JoramAdminMBeanname - The name of the topic.AdminException - If the creation fails.ConnectException - if the connection is closed or brokenJoramAdminMBean.topicCreate(int, String)public void topicCreate(int serverId,
String name)
throws AdminException,
ConnectException
JoramAdminMBeanTopic instance.topicCreate in interface JoramAdminMBeanserverId - 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 brokenpublic void getLocalUsers()
throws ConnectException,
AdminException
JoramAdminMBeangetLocalUsers in interface JoramAdminMBeanConnectException - If the connection fails.AdminException - Never thrown.JoramAdminMBean.getAllUsers(int)public void getAllUsers(int serverId)
throws ConnectException,
AdminException
JoramAdminMBeanThe request fails if the target server does not belong to the platform.
getAllUsers in interface JoramAdminMBeanserverId - Unique identifier of the given server.ConnectException - If the connection fails.AdminException - If the request fails.public void userCreate(String name, String password) throws AdminException, ConnectException
JoramAdminMBeanuserCreate in interface JoramAdminMBeanname - The login name of the user.password - The password of the user.AdminException - If the creation fails.ConnectException - If the connection fails.JoramAdminMBean.userCreate(String, String, int, String)public void userCreate(String name, String password, String identityClass) throws AdminException, ConnectException
JoramAdminMBeanuserCreate in interface JoramAdminMBeanname - 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.JoramAdminMBean.userCreate(String, String, int, String)public void userCreate(String name, String password, int serverId) throws AdminException, ConnectException
JoramAdminMBeanuserCreate in interface JoramAdminMBeanname - 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.JoramAdminMBean.userCreate(String, String, int, String)public void userCreate(String name, String password, int serverId, String identityClass) throws ConnectException, AdminException
JoramAdminMBeanuserCreate in interface JoramAdminMBeanname - 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.ConnectException - If the connection fails.AdminException - If the creation fails.public Hashtable getStatistics() throws ConnectException, AdminException
AdminItfgetStatistics in interface AdminItfConnectException - If the connection fails.AdminException - Never thrown.AdminItf.getStatistics(int)public Hashtable getStatistics(int serverId) throws ConnectException, AdminException
AdminItfThe request fails if the target server does not belong to the platform.
getStatistics in interface AdminItfserverId - Unique identifier of the server.ConnectException - If the connection fails.AdminException - If the request fails.public Hashtable getJMXAttribute(String attname) throws ConnectException, AdminException
AdminItfgetJMXAttribute in interface AdminItfConnectException - If the connection fails.AdminException - Never thrown.AdminItf.getStatistics(int)public Hashtable getJMXAttribute(int serverId, String attname) throws ConnectException, AdminException
AdminItfThe request fails if the target server does not belong to the platform.
getJMXAttribute in interface AdminItfserverId - Unique identifier of the server.ConnectException - If the connection fails.AdminException - If the request fails.public String[] getServersNames() throws ConnectException, AdminException
AdminItfgetServersNames in interface AdminItfConnectException - If the connection fails.AdminException - Never thrown.AdminItf.getServers(String)public String[] getServersNames(String domain) throws ConnectException, AdminException
AdminItfgetServersNames in interface AdminItfdomain - Name of the domain.ConnectException - If the connection fails.AdminException - Never thrown.public Server getLocalServer() throws ConnectException, AdminException
AdminItfgetLocalServer in interface AdminItfConnectException - If the connection fails.AdminException - If the request fails.public int getLocalServerId()
throws ConnectException,
AdminException
AdminItfgetLocalServerId in interface AdminItfConnectException - If the admin connection is not established.AdminException - If the request fails.AdminItf.getLocalServer()public String getLocalHost() throws ConnectException, AdminException
AdminItfgetLocalHost in interface AdminItfConnectException - If the admin connection is not established.AdminException - If the request fails.AdminItf.getLocalServer()public String getLocalName() throws ConnectException, AdminException
AdminItfgetLocalName in interface AdminItfConnectException - If the admin connection is not established.AdminException - If the request fails.AdminItf.getLocalServer()public org.objectweb.joram.shared.admin.AdminReply doRequest(org.objectweb.joram.shared.admin.AdminRequest request)
throws AdminException,
ConnectException
AdminItfAdminRequest instance to
the platform and getting an AdminReply instance.doRequest in interface AdminItfrequest - the administration request to sendAdminException - If the platform's reply is invalid, or if
the request failed.ConnectException - If the connection to the platform fails.public void abortRequest()
throws ConnectException
abortRequest in interface AdminItfConnectExceptionpublic String invokeStaticServerMethod(int serverId, String className, String methodName, Class<?>[] parameterTypes, Object[] args) throws ConnectException, AdminException
AdminItfinvokeStaticServerMethod in interface AdminItfserverId - 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 failspublic String invokeStaticServerMethod(int serverId, String className, String methodName, Class<?>[] parameterTypes, Object[] args, boolean async) throws ConnectException, AdminException
ConnectExceptionAdminExceptionpublic String addAMQPBridgeConnection(int serverId, String urls) throws ConnectException, AdminException
AdminItfaddAMQPBridgeConnection in interface AdminItfserverId - 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 failspublic String deleteAMQPBridgeConnection(int serverId, String names) throws ConnectException, AdminException
AdminItfdeleteAMQPBridgeConnection in interface AdminItfserverId - 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 failspublic String addJMSBridgeConnection(int serverId, String urls) throws ConnectException, AdminException
AdminItfaddJMSBridgeConnection in interface AdminItfserverId - 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 failspublic String deleteJMSBridgeConnection(int serverId, String names) throws ConnectException, AdminException
AdminItfdeleteJMSBridgeConnection in interface AdminItfserverId - 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 failspublic String deleteJMSBridgeConnection(int serverId, String names, boolean async) throws ConnectException, AdminException
AdminItfdeleteJMSBridgeConnection in interface AdminItfserverId - the serverIdnames - the name identifying the server or list of name separate by spaceasync - invoke asynchronouslyConnectException - If the connection fails.AdminException - If the invocation can't be done or failspublic String deleteJMSPBridgeConnection(int serverId, String names) throws ConnectException, AdminException
AdminItfdeleteJMSPBridgeConnection in interface AdminItfserverId - 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 failspublic String deleteJMSPBridgeConnection(int serverId, String names, boolean async) throws ConnectException, AdminException
AdminItfdeleteJMSPBridgeConnection in interface AdminItfserverId - the serverIdnames - the name identifying the server or list of name separate by spaceasync - invoke asynchronouslyConnectException - If the connection fails.AdminException - If the invocation can't be done or failsCopyright © 2023 ScalAgent D.T.. All rights reserved.