Joram 5.2.4

org.objectweb.joram.client.jms.admin
Class JoramAdmin

java.lang.Object
  extended by org.objectweb.joram.client.jms.admin.AdminWrapper
      extended by org.objectweb.joram.client.jms.admin.JoramAdmin
All Implemented Interfaces:
JoramAdminMBean

public class JoramAdmin
extends AdminWrapper
implements JoramAdminMBean

JoramAdmin is the implementation of the interface JoramAdminMBean. It must only be used to allow administration through JMX.

See Also:
AdminModule, AdminWrapper

Field Summary
protected  java.lang.String JMXBaseName
           
static org.objectweb.util.monolog.api.Logger logger
           
 
Fields inherited from class org.objectweb.joram.client.jms.admin.AdminWrapper
ADM_NAME_PROPERTY, DEFAULT_ADM_NAME, DEFAULT_REQUEST_TIMEOUT, REQUEST_TIMEOUT_PROP
 
Constructor Summary
JoramAdmin(javax.jms.Connection cnx)
          Creates a MBean to administer Joram using the default basename.
JoramAdmin(javax.jms.Connection cnx, java.lang.String base)
          Creates a MBean to administer Joram using the given basename.
 
Method Summary
 boolean executeXMLAdmin(java.lang.String path)
          This method execute the XML script file that the pathname is given in parameter.
 boolean executeXMLAdmin(java.lang.String cfgDir, java.lang.String cfgFileName)
          This method execute the XML script file that the location is given in parameter.
 void exit()
           
 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) Be careful, currently this method use the static administration connection through the AdminModule Class.
 void registerMBean(java.lang.String base)
           
 void unregisterMBean()
           
 
Methods inherited from class org.objectweb.joram.client.jms.admin.AdminWrapper
abortRequest, addDomain, addDomain, addServer, addServer, close, createDeadMQueue, createQueue, createQueue, createQueue, createTopic, createTopic, createTopic, createUser, createUser, createUser, createUser, doRequest, getConfiguration, getDefaultDMQ, getDefaultDMQ, getDefaultDMQId, getDefaultDMQId, getDefaultThreshold, getDefaultThreshold, getDestinations, getDestinations, getDomainNames, getLocalHost, getLocalName, getLocalServer, getLocalServerId, getServers, getServers, getServersIds, getServersIds, getTimeOutToAbortRequest, getUsers, getUsers, isClosed, removeDomain, removeServer, setDefaultDMQ, setDefaultDMQ, setDefaultDMQId, setDefaultDMQId, setDefaultThreshold, setDefaultThreshold, setTimeOutToAbortRequest, stopServer, stopServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.joram.client.jms.admin.JoramAdminMBean
addDomain, addDomain, addServer, addServer, createQueue, createQueue, createQueue, createTopic, createTopic, createTopic, createUser, createUser, createUser, createUser, getConfiguration, getDefaultDMQId, getDefaultDMQId, getDefaultThreshold, getDefaultThreshold, getDestinations, getDestinations, getDomainNames, getServersIds, getServersIds, getTimeOutToAbortRequest, getUsers, getUsers, removeDomain, removeServer, setDefaultDMQId, setDefaultDMQId, setDefaultThreshold, setDefaultThreshold, setTimeOutToAbortRequest, stopServer, stopServer
 

Field Detail

logger

public static org.objectweb.util.monolog.api.Logger logger

JMXBaseName

protected transient java.lang.String JMXBaseName
Constructor Detail

JoramAdmin

public JoramAdmin(javax.jms.Connection cnx)
           throws java.net.ConnectException,
                  AdminException,
                  javax.jms.JMSException
Creates a MBean to administer Joram using the default basename. Be careful, if the connection is not started this method will failed with a ConnectException.

Parameters:
cnx - A valid connection to the Joram server.
Throws:
javax.jms.JMSException - A problem occurs during initialization.
java.net.ConnectException
AdminException
See Also:
#JoramAdmin(Connection, String)}, AdminWrapper.AdminWrapper(Connection)

JoramAdmin

public JoramAdmin(javax.jms.Connection cnx,
                  java.lang.String base)
           throws java.net.ConnectException,
                  AdminException,
                  javax.jms.JMSException
Creates a MBean to administer Joram using the given basename. Be careful, if the connection is not started this method will failed with a ConnectException.

Parameters:
cnx - A valid connection to the Joram server.
base - the basename for registering the MBean.
Throws:
javax.jms.JMSException - A problem occurs during initialization.
java.net.ConnectException
AdminException
See Also:
AdminWrapper.AdminWrapper(Connection)
Method Detail

exit

public void exit()

registerMBean

public void registerMBean(java.lang.String base)

unregisterMBean

public void unregisterMBean()

executeXMLAdmin

public boolean executeXMLAdmin(java.lang.String cfgDir,
                               java.lang.String cfgFileName)
                        throws java.lang.Exception
This method execute the XML script file that the location is given in parameter.

Be careful, currently this method use the static administration connection through the AdminModule Class.

Specified by:
executeXMLAdmin in interface JoramAdminMBean
Parameters:
cfgDir - The directory containing the file.
cfgFileName - The script filename.
Returns:
Throws:
java.lang.Exception

executeXMLAdmin

public boolean executeXMLAdmin(java.lang.String path)
                        throws java.lang.Exception
This method execute the XML script file that the pathname is given in parameter.

Be careful, currently this method use the static administration connection through the AdminModule Class.

Specified by:
executeXMLAdmin in interface JoramAdminMBean
Parameters:
path - The script pathname.
Throws:
java.lang.Exception

exportRepositoryToFile

public void exportRepositoryToFile(java.lang.String exportDir,
                                   java.lang.String exportFilename)
                            throws AdminException
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.

Specified by:
exportRepositoryToFile in interface JoramAdminMBean
Parameters:
exportDir - target directory where the export file will be put
exportFilename - filename of the export file
Throws:
AdminException - if an error occurs

Joram 5.2.4

Copyright © 2000 - 2009 Scalagent D.T. - All rights reserved