org.objectweb.cjdbc.controller.jmx
Class ControllerJmxClient

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.jmx.JmxClient
      extended byorg.objectweb.cjdbc.controller.jmx.ControllerJmxClient

public class ControllerJmxClient
extends JmxClient

This class is used to connect to the CjdbcJmxAgent and contains CJDBC information

Version:
1.0
Author:
Nicolas Modrzyk

Field Summary
private  javax.management.ObjectName controller
           
 
Fields inherited from class org.objectweb.cjdbc.controller.jmx.JmxClient
remoteHostAddress, remoteHostName, server
 
Constructor Summary
ControllerJmxClient()
           
 
Method Summary
private  void addDriver(byte[] bytes)
           
 void addDriver(java.lang.String filename)
          Add a driver given its filename
 void addVirtualDatabase(java.lang.String xmlConfig)
          Sends a XML configuration file to the controller.
 void addVirtualDatabases(java.lang.String xml)
           
 void addVirtualDatabases(java.lang.String xml, java.lang.String virtualName, boolean autoEnable, java.lang.String checkPoint)
           
 void connect(java.lang.String host, java.lang.String port)
          Find the naming service and connect to the JMXAgent on the controller side.
 void connect(java.lang.String host, java.lang.String port, java.lang.String name)
          Find the naming service and connect tor the JMXAgent on the controller side.
 java.lang.String getDump()
          Gets information from the C-JDBC controller.
 java.lang.String getInfo()
          Gets information from the C-JDBC controller.
 java.util.ArrayList getVirtualDatabases()
           
 java.lang.String loadXML(java.lang.String filename)
           
 java.lang.String loadXmlConfiguration(java.lang.String filename, java.lang.String virtualName, boolean autoEnable, java.lang.String checkPoint)
           
 void refreshLogConfiguration()
          Forces logging system configuration refresh.
 java.lang.String removeVirtualDatabase(java.lang.String virtualname)
           
 java.lang.String saveConfiguration()
           
 void shutdown(int level)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controller

private javax.management.ObjectName controller
Constructor Detail

ControllerJmxClient

public ControllerJmxClient()
Method Detail

connect

public void connect(java.lang.String host,
                    java.lang.String port)
             throws JmxException
Find the naming service and connect to the JMXAgent on the controller side.

Overrides:
connect in class JmxClient
Parameters:
host - the host where the controller is running
port - on which the rmi has been set up
Throws:
JmxException - if fails

connect

public void connect(java.lang.String host,
                    java.lang.String port,
                    java.lang.String name)
             throws JmxException
Find the naming service and connect tor the JMXAgent on the controller side.

Parameters:
host - the host where the controller is running
port - on which the rmi has been set up
name - of the controller to connect to
Throws:
JmxException - if fails

getInfo

public java.lang.String getInfo()
                         throws JmxException
Gets information from the C-JDBC controller.

Returns:
the info of the controller
Throws:
JmxException - if a error occurs

getDump

public java.lang.String getDump()
                         throws JmxException
Gets information from the C-JDBC controller.

Returns:
the info of the controller
Throws:
JmxException - if a error occurs

refreshLogConfiguration

public void refreshLogConfiguration()
                             throws JmxException
Forces logging system configuration refresh.

Throws:
JmxException - if fails

addVirtualDatabase

public void addVirtualDatabase(java.lang.String xmlConfig)
                        throws JmxException
Sends a XML configuration file to the controller.

Parameters:
xmlConfig - the configuration of the virtualDatabase in xml fornat wrapped in a string
Throws:
JmxException - if fails

addDriver

private void addDriver(byte[] bytes)
                throws JmxException
Throws:
JmxException
See Also:
ControllerMBean.addDriver(java.lang.String)

addDriver

public void addDriver(java.lang.String filename)
               throws java.io.FileNotFoundException,
                      java.io.IOException,
                      JmxException
Add a driver given its filename

Parameters:
filename - the path to the library to add
Throws:
java.io.FileNotFoundException - if path to file is invalid
java.io.IOException - if reading of file fails
JmxException - if communication fails

addVirtualDatabases

public void addVirtualDatabases(java.lang.String xml,
                                java.lang.String virtualName,
                                boolean autoEnable,
                                java.lang.String checkPoint)
                         throws JmxException
Throws:
JmxException
See Also:
ControllerMBean.addVirtualDatabases(java.lang.String, java.lang.String, boolean, java.lang.String)

addVirtualDatabases

public void addVirtualDatabases(java.lang.String xml)
                         throws JmxException
Throws:
JmxException
See Also:
ControllerMBean.addVirtualDatabases(java.lang.String)

getVirtualDatabases

public java.util.ArrayList getVirtualDatabases()
                                        throws JmxException
Throws:
JmxException
See Also:
ControllerMBean.getVirtualDatabases()

loadXML

public java.lang.String loadXML(java.lang.String filename)
                         throws java.io.IOException,
                                JmxException
Throws:
java.io.IOException
JmxException
See Also:
ControllerMBean.loadXML(java.lang.String)

loadXmlConfiguration

public java.lang.String loadXmlConfiguration(java.lang.String filename,
                                             java.lang.String virtualName,
                                             boolean autoEnable,
                                             java.lang.String checkPoint)
                                      throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
ControllerMBean.loadXmlConfiguration(java.lang.String, java.lang.String, boolean, java.lang.String)

removeVirtualDatabase

public java.lang.String removeVirtualDatabase(java.lang.String virtualname)
                                       throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
ControllerMBean.removeVirtualDatabase(java.lang.String)

saveConfiguration

public java.lang.String saveConfiguration()
                                   throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
ControllerMBean.saveConfiguration()

shutdown

public void shutdown(int level)
              throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
ControllerMBean.shutdown(int)


Copyright © 2002, 2003 - ObjectWeb Consortium - All Rights Reserved.