org.objectweb.cjdbc.controller.core
Class Controller

java.lang.Object
  extended byjavax.management.StandardMBean
      extended byorg.objectweb.cjdbc.controller.jmx.AbstractStandardMBean
          extended byorg.objectweb.cjdbc.controller.core.Controller
All Implemented Interfaces:
ControllerMBean, javax.management.DynamicMBean, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, XmlComponent

public final class Controller
extends AbstractStandardMBean
implements ControllerMBean, XmlComponent

The C-JDBC controller main class. It registers itself in the RMI registry and waits for C-JDBC driver requests.

Version:
1.0
Author:
Emmanuel Cecchet , Mathieu Peltier , Nicolas Modrzyk , Duncan Smith

Nested Class Summary
 
Nested classes inherited from class javax.management.StandardMBean
 
Field Summary
private  int backlogSize
           
private  java.util.Hashtable configuration
          Hashtable of options
private  ControllerServerThread connectionThread
          Thread that listens for driver connections
private  java.lang.String ipAddress
          The IP address to bind the controller to.
private  boolean isShuttingDown
           
(package private) static Trace logger
          Logger instance.
private  int portNumber
          C-JDBC controller port number listening for driver connections
private  ReportManager report
          Report Manager
private  ControllerSecurityManager security
          Security Manager
private  java.util.Hashtable virtualDatabases
          Hashtable of VirtualDatabase objects.
 
Fields inherited from class org.objectweb.cjdbc.controller.jmx.AbstractStandardMBean
 
Fields inherited from class javax.management.StandardMBean
 
Fields inherited from interface org.objectweb.cjdbc.common.xml.XmlComponent
DOCTYPE_DB, XML_VERSION
 
Constructor Summary
Controller(java.lang.String ipAddress, int port, int backlog)
          Creates a new Controller instance.
 
Method Summary
 void addDriver(byte[] bytes)
          Reads a driver binary data
 java.lang.String addDriver(java.lang.String filename)
          Reads a driver JAR file.
 void addVirtualDatabase(VirtualDatabase vdb)
          Registers a new VirtualDatabase in this controller.
 void addVirtualDatabase(VirtualDatabase vdb, int autoLoad, java.lang.String checkPoint)
          Add the virtual database with the specified options
 void addVirtualDatabases(java.lang.String xml)
          Register a VirtualDatabase with default options
 void addVirtualDatabases(java.lang.String xml, java.lang.String virtualName, int autoLoad, java.lang.String checkPoint)
          Registers one or several virtual databases in the controller.
 void endOfController(java.lang.Exception fatal)
          Create report about fatal error
 java.lang.String generateLogReport()
          Generate a log report on the controller now
 java.lang.String generateReport()
          Generate a report on the controller now
 java.lang.String getAssociatedString()
          Allow to retrieve internationalization description on mbeans as well
 int getBacklogSize()
          Get the controller socket backlog size.
 java.util.Hashtable getConfiguration()
          Get current configuration options
 ControllerServerThread getConnectionThread()
          Access the connection thread.
 java.lang.String getIPAddress()
          Get the IP address to bind the controller to
 boolean getIsShuttingDown()
          Is the controller shutting down ?
 boolean getJmxEnable()
          Returns jmx enable
 java.lang.String getJmxName()
          Return the jmx name of this controller (hostname:rmiport)
 java.lang.String getName()
          Returns the controller name.
 int getPortNumber()
          Get the controller port number
 ReportManager getReport()
          Returns the report value.
 ControllerSecurityManager getSecurity()
           
static java.lang.String getVersion()
          Returns Version as a long String
 java.lang.String getVersionNumber()
          Gets the controller version.
 VirtualDatabase getVirtualDatabase(java.lang.String virtualDatabaseName)
          Gets the VirtualDatabase object corresponding to a virtual database name.
 java.util.ArrayList getVirtualDatabases()
          Returns information about the available virtual databases.
 java.lang.String getXml()
          Get xml formatted representation of this cjdbc component
 java.lang.String getXmlController()
          Return the xml version of the controller.xml file without doc type declaration, just data.
 java.lang.String getXmlVirtualDatabases()
          Same as above but for the virtual databases.
 boolean hasVirtualDatabase(java.lang.String name)
          Tests if a VirtualDatabase of a given name exists in this controller.
 boolean isCacheEnableForDatabase(java.lang.String virtualDbName)
          Tell whether the database has some cache enabled
 boolean isDistributedVirtualDatabase(java.lang.String databaseName)
           
 boolean isSecurityEnabled()
          Check whether security is enabled or not
 void launch()
          Actively launch the controller Add startup actions here to avoid them in main
 java.io.File[] listAvailableDumpFiles()
          List all the available dump files on this controller
 java.util.ArrayList listBackends(java.lang.String virtualDbName)
          Returns the list of backends for a given database name
 java.util.ArrayList listDatabaseClients(java.lang.String virtualDbName)
          Get the VirtualDatabaseWorkerThread clients of the given database
 java.util.ArrayList listVirtualDatabases()
          Gets the name of the available virtual databases.
 java.lang.String loadXML(java.lang.String filename)
          Read a XML configuration file for a set of virtual databases
 java.lang.String loadXmlConfiguration(java.lang.String filename, java.lang.String virtualName, int autoLoad, java.lang.String checkPoint)
          Read a XML configuration file and load only the VirtualDatabase specified in the arguments list
static void main(java.lang.String[] args)
          Launches the C-JDBC controller and bind it with RMI registry.
 void refreshLogConfiguration()
          Refreshs the logging system configuration by re-reading the log4j.properties file.
 boolean removeDumpFile(java.io.File dumpFile)
          Delete a dump file from the controller repository
 java.lang.String removeVirtualDatabase(java.lang.String virtualname)
          Prevent the controller from accessing a virtual database thereafter
 java.lang.String saveConfiguration()
          Save current configuration of the controller to a default file
 void setBacklogSize(int size)
          Set the controller socket backlog size.
 void setConfiguration(java.util.Hashtable configuration)
          Sets the configuration value.
 void setIPAddress(java.lang.String ipAddress)
          Set the IP address to bind the controller to
 void setJmxEnable(boolean enable)
          set enable JMX
 void setPortNumber(int port)
          Set the controller backlog size.
 void setReport(ReportManager report)
          Sets the report value.
 void setSecurity(ControllerSecurityManager security)
           
 void shutdown()
          Turns the controller down by using default shutdown level
 void shutdown(int level)
          Turns the controller down by using default shutdown level
 void shutdown(int level, boolean systemExit)
           
 void shutdownDatabase(java.lang.String databaseName, int level)
          Shutdown a database in the given mode.
 void updateLogConfigurationFile(java.lang.String newConfiguration)
          Update the log4j configuration file with the given content Also call refreshLogConfiguration method
 java.lang.String viewConfiguration()
          Retrieve the configuration about this controller in text format.
 java.lang.String viewDatabases()
          Make a separation between the configuration of the controller and the virtual databases
 java.lang.String viewDatabasesXml()
          View xml configuration of the databases without transformation
 java.lang.String viewDatabaseXml(java.lang.String databaseName)
          View the xml configuration of the given database
 java.lang.String viewInfo()
          Retrieve the information about this controller in xml format.
 java.lang.String viewLogConfigurationFile()
          Retrieve the content of the log4j configuration file
 
Methods inherited from class org.objectweb.cjdbc.controller.jmx.AbstractStandardMBean
addNotificationListener, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getNotificationInfo, getParameterName, getParameterName, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, invoke, setAttribute, setAttributes, setImplementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

portNumber

private int portNumber
C-JDBC controller port number listening for driver connections


backlogSize

private int backlogSize

ipAddress

private java.lang.String ipAddress
The IP address to bind the controller to. Useful for machines that contain multiple network interface cards and wish to bind to a specific card. Default evaluates to localhost IP address (127.0.0.1).


connectionThread

private ControllerServerThread connectionThread
Thread that listens for driver connections


logger

static Trace logger
Logger instance.


virtualDatabases

private java.util.Hashtable virtualDatabases
Hashtable of VirtualDatabase objects.


configuration

private java.util.Hashtable configuration
Hashtable of options


security

private ControllerSecurityManager security
Security Manager


report

private ReportManager report
Report Manager


isShuttingDown

private boolean isShuttingDown
Constructor Detail

Controller

public Controller(java.lang.String ipAddress,
                  int port,
                  int backlog)
           throws javax.management.NotCompliantMBeanException,
                  JmxException
Creates a new Controller instance.

Parameters:
ipAddress - bind the controller to this ipAddress
port - bind the controller to listen to this port
backlog - backlog connection size
Throws:
javax.management.NotCompliantMBeanException - in case the bean does not comply with jmx
JmxException - the bean could not be registered
Method Detail

getAssociatedString

public java.lang.String getAssociatedString()
Description copied from class: AbstractStandardMBean
Allow to retrieve internationalization description on mbeans as well

Specified by:
getAssociatedString in class AbstractStandardMBean
Returns:
part of the key to look for in the translation file.
See Also:
AbstractStandardMBean.getAssociatedString()

getIsShuttingDown

public boolean getIsShuttingDown()
Description copied from interface: ControllerMBean
Is the controller shutting down ?

Specified by:
getIsShuttingDown in interface ControllerMBean
Returns:
true if the controller is no more accepting connection
See Also:
ControllerMBean.getIsShuttingDown()

addVirtualDatabases

public void addVirtualDatabases(java.lang.String xml,
                                java.lang.String virtualName,
                                int autoLoad,
                                java.lang.String checkPoint)
                         throws ControllerException
Description copied from interface: ControllerMBean
Registers one or several virtual databases in the controller. The description of each Virtual Database must contain the definition of the backends and components (cache, scheduler, load balancer) to use.

This function expects the content of an XML file conforming to the C-JDBC DTD to be given as a single String object.

Specified by:
addVirtualDatabases in interface ControllerMBean
Parameters:
xml - XML code to parse
virtualName - name of the virtual database
autoLoad - specify if should be enabled as soon as it is added
checkPoint - the checkpoint to use to enable the database
Throws:
ControllerException - if an error occurs while interpreting XML
See Also:
ControllerMBean.addVirtualDatabases(String, String, int, String)

addVirtualDatabases

public void addVirtualDatabases(java.lang.String xml)
                         throws ControllerException
Register a VirtualDatabase with default options

Specified by:
addVirtualDatabases in interface ControllerMBean
Parameters:
xml - XML code to parse
Throws:
ControllerException - if an error occurs while interpreting XML
See Also:
ControllerMBean.addVirtualDatabases(String)

addVirtualDatabase

public void addVirtualDatabase(VirtualDatabase vdb)
                        throws ControllerException
Registers a new VirtualDatabase in this controller.

Parameters:
vdb - the VirtualDatabase to register
Throws:
ControllerException - if an error occurs

addVirtualDatabase

public void addVirtualDatabase(VirtualDatabase vdb,
                               int autoLoad,
                               java.lang.String checkPoint)
                        throws ControllerException
Add the virtual database with the specified options

Parameters:
vdb - the VirtualDatabase object to add
autoLoad - specified if backends should be enabled
checkPoint - specified the checkPoint to recover from, leave null if no recovery speficied
Throws:
ControllerException - if database already exists on the specified Controller object

viewInfo

public java.lang.String viewInfo()
                          throws java.lang.Exception
Description copied from interface: ControllerMBean
Retrieve the information about this controller in xml format.

Specified by:
viewInfo in interface ControllerMBean
Returns:
the complete xml formatted description of this controller
Throws:
java.lang.Exception - if fails
See Also:
ControllerMBean.viewInfo()

viewConfiguration

public java.lang.String viewConfiguration()
                                   throws java.lang.Exception
Description copied from interface: ControllerMBean
Retrieve the configuration about this controller in text format.

Specified by:
viewConfiguration in interface ControllerMBean
Returns:
the complete xml formatted description of this controller
Throws:
java.lang.Exception - if fails
See Also:
ControllerMBean.viewConfiguration()

viewDatabases

public java.lang.String viewDatabases()
                               throws java.lang.Exception
Description copied from interface: ControllerMBean
Make a separation between the configuration of the controller and the virtual databases

Specified by:
viewDatabases in interface ControllerMBean
Returns:
databases info in text format
Throws:
java.lang.Exception - if fails
See Also:
ControllerMBean.viewDatabases()

viewDatabasesXml

public java.lang.String viewDatabasesXml()
                                  throws java.lang.Exception
Description copied from interface: ControllerMBean
View xml configuration of the databases without transformation

Specified by:
viewDatabasesXml in interface ControllerMBean
Returns:
xml formatted text
Throws:
java.lang.Exception - if an error occurs
See Also:
ControllerMBean.viewDatabasesXml()

removeVirtualDatabase

public java.lang.String removeVirtualDatabase(java.lang.String virtualname)
                                       throws ControllerException
Description copied from interface: ControllerMBean
Prevent the controller from accessing a virtual database thereafter

Specified by:
removeVirtualDatabase in interface ControllerMBean
Parameters:
virtualname - the virtual database name to remove
Returns:
description message
Throws:
ControllerException
See Also:
ControllerMBean.removeVirtualDatabase(String)

addDriver

public void addDriver(byte[] bytes)
               throws java.lang.Exception
Description copied from interface: ControllerMBean
Reads a driver binary data

Specified by:
addDriver in interface ControllerMBean
Parameters:
bytes - the data in a byte array
Throws:
java.lang.Exception - if fails
See Also:
ControllerMBean.addDriver(byte[])

getVirtualDatabase

public VirtualDatabase getVirtualDatabase(java.lang.String virtualDatabaseName)
Gets the VirtualDatabase object corresponding to a virtual database name.

Parameters:
virtualDatabaseName - the virtual database name
Returns:
a VirtualDatabase object or null if not found

refreshLogConfiguration

public void refreshLogConfiguration()
                             throws ControllerException
Description copied from interface: ControllerMBean
Refreshs the logging system configuration by re-reading the log4j.properties file.

Specified by:
refreshLogConfiguration in interface ControllerMBean
Throws:
ControllerException - if the log4j.properties file cannot be found in classpath
See Also:
ControllerMBean.refreshLogConfiguration()

getVersionNumber

public java.lang.String getVersionNumber()
Description copied from interface: ControllerMBean
Gets the controller version.

Specified by:
getVersionNumber in interface ControllerMBean
Returns:
a String value containing the version number
See Also:
ControllerMBean.getVersionNumber()

getXml

public java.lang.String getXml()
Description copied from interface: XmlComponent
Get xml formatted representation of this cjdbc component

Specified by:
getXml in interface XmlComponent
Returns:
xml formatted fragment
See Also:
XmlComponent.getXml()

getXmlController

public java.lang.String getXmlController()
Return the xml version of the controller.xml file without doc type declaration, just data.

Returns:
controller xml data

getXmlVirtualDatabases

public java.lang.String getXmlVirtualDatabases()
Same as above but for the virtual databases.

Returns:
xml virtual databases data.

getConnectionThread

public ControllerServerThread getConnectionThread()
Access the connection thread. Need this for shutting down

Returns:
connectionThread

shutdown

public void shutdown()
              throws ControllerException
Turns the controller down by using default shutdown level

Throws:
ControllerException
See Also:
ControllerMBean.shutdown(int)

shutdown

public void shutdown(int level)
              throws ControllerException
Description copied from interface: ControllerMBean
Turns the controller down by using default shutdown level

Specified by:
shutdown in interface ControllerMBean
Parameters:
level - Smart,Fast or Immediate.
Throws:
ControllerException - if unknown level or other error occurs.
See Also:
ControllerMBean.shutdown(int)

shutdownDatabase

public void shutdownDatabase(java.lang.String databaseName,
                             int level)
                      throws ControllerException
Description copied from interface: ControllerMBean
Shutdown a database in the given mode. This shuts down the backends and make backups depending on the shutdown level

Specified by:
shutdownDatabase in interface ControllerMBean
Parameters:
databaseName - the database to shut down
level - the level of shutdown define in ControllerConstants
Throws:
ControllerException - if fails
See Also:
ControllerMBean.shutdownDatabase(String, int)

shutdown

public void shutdown(int level,
                     boolean systemExit)
              throws ControllerException
Throws:
ControllerException
See Also:
ControllerMBean.shutdown(int)

saveConfiguration

public java.lang.String saveConfiguration()
                                   throws VirtualDatabaseException
Save current configuration of the controller to a default file

Specified by:
saveConfiguration in interface ControllerMBean
Returns:
Status message
Throws:
VirtualDatabaseException - if an error occurs
See Also:
ControllerConstants.getSaveFile(java.lang.String)

hasVirtualDatabase

public boolean hasVirtualDatabase(java.lang.String name)
Tests if a VirtualDatabase of a given name exists in this controller.

Specified by:
hasVirtualDatabase in interface ControllerMBean
Parameters:
name - the virtual database name
Returns:
true if the virtual database exists

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Launches the C-JDBC controller and bind it with RMI registry. The available options are:

The controller starts listening for socket connections on the default port. Jmx is configured, and a virtual database can be added.

ControllerConstants.DEFAULT_PORT Default Listening port

Parameters:
args - command line arguments (see above)
Throws:
java.lang.Exception - when everything goes wrong

endOfController

public void endOfController(java.lang.Exception fatal)
Create report about fatal error

Parameters:
fatal - the cause of the fatal error

launch

public void launch()
Actively launch the controller Add startup actions here to avoid them in main


getName

public java.lang.String getName()
Returns the controller name.

Specified by:
getName in interface ControllerMBean
Returns:
String

loadXmlConfiguration

public java.lang.String loadXmlConfiguration(java.lang.String filename,
                                             java.lang.String virtualName,
                                             int autoLoad,
                                             java.lang.String checkPoint)
                                      throws java.lang.Exception
Read a XML configuration file and load only the VirtualDatabase specified in the arguments list

Specified by:
loadXmlConfiguration in interface ControllerMBean
Parameters:
filename - XML configuration file name to take info on VirtualDatabase
virtualName - the only database to load, null if should load all
autoLoad - specifies if the backends should be enabled automatically after loading
checkPoint - checkPoint to recover from when enabling backends. Leave null if no recovery option is needed.
Returns:
a diagnostic message (success or error)
Throws:
java.lang.Exception - if an error occurs

loadXML

public java.lang.String loadXML(java.lang.String filename)
                         throws java.lang.Exception
Read a XML configuration file for a set of virtual databases

Specified by:
loadXML in interface ControllerMBean
Parameters:
filename - XML configuration file name
Returns:
a diagnostic message (success or error)
Throws:
java.lang.Exception - if an error occurs

addDriver

public java.lang.String addDriver(java.lang.String filename)
                           throws java.lang.Exception
Reads a driver JAR file.

Specified by:
addDriver in interface ControllerMBean
Parameters:
filename - name of the file
Returns:
a diagnostic message
Throws:
java.lang.Exception - if an error occurs

getVirtualDatabases

public java.util.ArrayList getVirtualDatabases()
Returns information about the available virtual databases.

Returns:
ArrayList of information about virtual databases.

getIPAddress

public java.lang.String getIPAddress()
Get the IP address to bind the controller to

Returns:
the IP address

setIPAddress

public void setIPAddress(java.lang.String ipAddress)
Set the IP address to bind the controller to

Parameters:
ipAddress - the IP address to use

getPortNumber

public int getPortNumber()
Get the controller port number

Specified by:
getPortNumber in interface ControllerMBean
Returns:
the port number

setPortNumber

public void setPortNumber(int port)
Set the controller backlog size.

Parameters:
port - the port number to set

getBacklogSize

public int getBacklogSize()
Description copied from interface: ControllerMBean
Get the controller socket backlog size.

Specified by:
getBacklogSize in interface ControllerMBean
Returns:
the backlog size
See Also:
ControllerMBean.getBacklogSize()

setBacklogSize

public void setBacklogSize(int size)
Description copied from interface: ControllerMBean
Set the controller socket backlog size.

Specified by:
setBacklogSize in interface ControllerMBean
Parameters:
size - backlog size
See Also:
ControllerMBean.setBacklogSize(int)

getJmxEnable

public boolean getJmxEnable()
Returns jmx enable

Returns:
jmxEnabled

getJmxName

public java.lang.String getJmxName()
Return the jmx name of this controller (hostname:rmiport)

Specified by:
getJmxName in interface ControllerMBean
Returns:
jmx name

setJmxEnable

public void setJmxEnable(boolean enable)
set enable JMX

Parameters:
enable - true if jmx should be enable.

getVersion

public static java.lang.String getVersion()
Returns Version as a long String

Returns:
version

getConfiguration

public java.util.Hashtable getConfiguration()
Get current configuration options

Returns:
configure a Hashtable with controller options

isSecurityEnabled

public boolean isSecurityEnabled()
Check whether security is enabled or not

Returns:
true if there is not null controller security manager

getSecurity

public ControllerSecurityManager getSecurity()
Returns:
Returns the security.

setSecurity

public void setSecurity(ControllerSecurityManager security)
Parameters:
security - The security to set.

listVirtualDatabases

public java.util.ArrayList listVirtualDatabases()
Description copied from interface: ControllerMBean
Gets the name of the available virtual databases.

Specified by:
listVirtualDatabases in interface ControllerMBean
Returns:
ArrayList containing String object representing the virtual database names
See Also:
ControllerMBean.listVirtualDatabases()

generateReport

public java.lang.String generateReport()
                                throws java.lang.Exception
Description copied from interface: ControllerMBean
Generate a report on the controller now

Specified by:
generateReport in interface ControllerMBean
Returns:
the content of the report
Throws:
java.lang.Exception - if fails
See Also:
ControllerMBean.generateReport()

listBackends

public java.util.ArrayList listBackends(java.lang.String virtualDbName)
                                 throws java.lang.Exception
Description copied from interface: ControllerMBean
Returns the list of backends for a given database name

Specified by:
listBackends in interface ControllerMBean
Parameters:
virtualDbName - name of the virtual database
Returns:
ArrayList of String of the names of the backends
Throws:
java.lang.Exception - if fails to access the backends
See Also:
ControllerMBean.listBackends(java.lang.String)

listDatabaseClients

public java.util.ArrayList listDatabaseClients(java.lang.String virtualDbName)
                                        throws java.lang.Exception
Description copied from interface: ControllerMBean
Get the VirtualDatabaseWorkerThread clients of the given database

Specified by:
listDatabaseClients in interface ControllerMBean
Parameters:
virtualDbName - the name of the virtual database
Returns:
ArrayList of
Throws:
java.lang.Exception - if fails
See Also:
ControllerMBean.listDatabaseClients(java.lang.String)

isCacheEnableForDatabase

public boolean isCacheEnableForDatabase(java.lang.String virtualDbName)
                                 throws java.lang.Exception
Description copied from interface: ControllerMBean
Tell whether the database has some cache enabled

Specified by:
isCacheEnableForDatabase in interface ControllerMBean
Parameters:
virtualDbName - name of the VirtualDatabase
Returns:
true if cache is enabled
Throws:
java.lang.Exception - if database does not exists
See Also:
ControllerMBean.isCacheEnableForDatabase(java.lang.String)

setConfiguration

public void setConfiguration(java.util.Hashtable configuration)
Sets the configuration value.

Parameters:
configuration - The configuration to set.

viewDatabaseXml

public java.lang.String viewDatabaseXml(java.lang.String databaseName)
                                 throws java.lang.Exception
Description copied from interface: ControllerMBean
View the xml configuration of the given database

Specified by:
viewDatabaseXml in interface ControllerMBean
Parameters:
databaseName - name of the database
Returns:
xml formatted text
Throws:
java.lang.Exception - if fails
See Also:
ControllerMBean.viewDatabaseXml(java.lang.String)

generateLogReport

public java.lang.String generateLogReport()
                                   throws java.lang.Exception
Description copied from interface: ControllerMBean
Generate a log report on the controller now

Specified by:
generateLogReport in interface ControllerMBean
Returns:
the content of the logreport
Throws:
java.lang.Exception - if fails
See Also:
ControllerMBean.generateLogReport()

listAvailableDumpFiles

public java.io.File[] listAvailableDumpFiles()
Description copied from interface: ControllerMBean
List all the available dump files on this controller

Specified by:
listAvailableDumpFiles in interface ControllerMBean
Returns:
an array of File denoting the available files. Cannot be null but can be empty.
See Also:
ControllerMBean.listAvailableDumpFiles()

removeDumpFile

public boolean removeDumpFile(java.io.File dumpFile)
Description copied from interface: ControllerMBean
Delete a dump file from the controller repository

Specified by:
removeDumpFile in interface ControllerMBean
Parameters:
dumpFile - the file reference of the dumpFile
Returns:
true deletion was completed, false otherwise
See Also:
ControllerMBean.removeDumpFile(java.io.File)

viewLogConfigurationFile

public java.lang.String viewLogConfigurationFile()
                                          throws java.io.IOException
Description copied from interface: ControllerMBean
Retrieve the content of the log4j configuration file

Specified by:
viewLogConfigurationFile in interface ControllerMBean
Returns:
String
Throws:
java.io.IOException - if IO problems
See Also:
ControllerMBean.viewLogConfigurationFile()

updateLogConfigurationFile

public void updateLogConfigurationFile(java.lang.String newConfiguration)
                                throws java.io.IOException,
                                       ControllerException
Description copied from interface: ControllerMBean
Update the log4j configuration file with the given content Also call refreshLogConfiguration method

Specified by:
updateLogConfigurationFile in interface ControllerMBean
Parameters:
newConfiguration - the content of the new log4j configuration
Throws:
ControllerException - if could not refresh the logs
java.io.IOException - if cannot access the log4j file
See Also:
ControllerMBean.updateLogConfigurationFile(java.lang.String)

isDistributedVirtualDatabase

public boolean isDistributedVirtualDatabase(java.lang.String databaseName)
Specified by:
isDistributedVirtualDatabase in interface ControllerMBean
See Also:
ControllerMBean.isDistributedVirtualDatabase(java.lang.String)

getReport

public ReportManager getReport()
Returns the report value.

Returns:
Returns the report.

setReport

public void setReport(ReportManager report)
Sets the report value.

Parameters:
report - The report to set.


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