org.ow2.petals.admin.jmx
Class JMXClientConnection

java.lang.Object
  extended by org.ow2.petals.admin.jmx.JMXClientConnection

public final class JMXClientConnection
extends java.lang.Object

This class manages the JMX connection to the remote Petals ESB.

Author:
Nicolas Oddoux - EBM WebSourcing

Field Summary
static org.ow2.petals.jmx.JMXClient jmxClient
           
 
Method Summary
static org.ow2.petals.jmx.JMXClient createJMXClient(java.lang.String host, int port, java.lang.String user, java.lang.String password)
          Create a new JMX client connected to the remote Petals ESB.
static void disconnectJMXClient()
          Disconnect the JMX client.
static org.ow2.petals.jmx.JMXClient getJMXClient()
          Get the JMX current client connected to the remote petals ESB.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jmxClient

public static org.ow2.petals.jmx.JMXClient jmxClient
Method Detail

createJMXClient

public static final org.ow2.petals.jmx.JMXClient createJMXClient(java.lang.String host,
                                                                 int port,
                                                                 java.lang.String user,
                                                                 java.lang.String password)
                                                          throws org.ow2.petals.jmx.exception.ConnectionErrorException
Create a new JMX client connected to the remote Petals ESB. If a connection already exists, it is closed and a new connection with the specified parameters is created.

Parameters:
host - the host of the Petals ESB JMX server
port - the port of the Petals ESB JMX server
user - the username of the Petals ESB JMX server
password - the password of the Petals ESB JMX server
Returns:
the JMX client to communicate with the remote Petals ESB
Throws:
java.lang.NumberFormatException - if the value of the property "petals.port" cannot be parsed as an integer
org.ow2.petals.jmx.exception.ConnectionErrorException - if the client cannot connect to the remote petals ESB

getJMXClient

public static final org.ow2.petals.jmx.JMXClient getJMXClient()
                                                       throws org.ow2.petals.jmx.exception.ConnectionErrorException
Get the JMX current client connected to the remote petals ESB. This method must be called after the creation of the JMX client.

Returns:
the current JMX client connected to the remote Petals ESB
Throws:
org.ow2.petals.jmx.exception.ConnectionErrorException - if there is no current client connection to the remote petals ESB

disconnectJMXClient

public static final void disconnectJMXClient()
                                      throws org.ow2.petals.jmx.exception.ConnectionErrorException
Disconnect the JMX client.

Throws:
org.ow2.petals.jmx.exception.ConnectionErrorException - if there is no current client connection to the remote petals ESB


Copyright © 2005-2012 Petals Link (EBM Websourcing). All Rights Reserved.