Class JoramAdminConnect
- java.lang.Object
-
- org.objectweb.joram.client.jms.admin.JoramAdminConnect
-
- All Implemented Interfaces:
JoramAdminConnectMBean
public class JoramAdminConnect extends Object implements JoramAdminConnectMBean
Allows the creation of JoramAdmin instances connected to servers.
-
-
Field Summary
Fields Modifier and Type Field Description static org.objectweb.util.monolog.api.Loggerlogger
-
Constructor Summary
Constructors Constructor Description JoramAdminConnect()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect(String name)Creates an administration connection with default parameters, a JoramAdmin MBean is created and registered in the given domain.voidconnect(String name, String host, int port, String user, String pass)Creates an administration connection with given parameters, a JoramAdmin MBean is created and registered.voidexit(boolean force)Unregisters the MBean.static voidmain(String[] args)voidregisterMBean()voidunregisterMBean()
-
-
-
Method Detail
-
main
public static void main(String[] args)
-
registerMBean
public void registerMBean()
-
unregisterMBean
public void unregisterMBean()
-
connect
public void connect(String name) throws ConnectException, AdminException
Creates an administration connection with default parameters, a JoramAdmin MBean is created and registered in the given domain.- Specified by:
connectin interfaceJoramAdminConnectMBean- Parameters:
name- The name of the corresponding JMX domain.- Throws:
AdminException- If the creation fails.ConnectException- if the connection is closed or broken
-
connect
public void connect(String name, String host, int port, String user, String pass) throws ConnectException, AdminException
Creates an administration connection with given parameters, a JoramAdmin MBean is created and registered.- Specified by:
connectin interfaceJoramAdminConnectMBean- Parameters:
name- The name of the corresponding JMX domain.host- The hostname of the server.port- The listening port of the server.user- The login identification of the administrator.pass- The password of the administrator.- Throws:
AdminException- If the creation fails.ConnectException- if the connection is closed or broken
-
exit
public void exit(boolean force)
Unregisters the MBean.- Specified by:
exitin interfaceJoramAdminConnectMBean- Parameters:
force- If true calls System.exit method.
-
-