org.objectweb.cjdbc.controller.console
Class VirtualDatabaseAdmin

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.console.VirtualDatabaseAdmin

public class VirtualDatabaseAdmin
extends java.lang.Object

This is the C-JDBC controller console virtual database administration module.

Version:
1.0
Author:
Emmanuel Cecchet , Mathieu Peltier

Field Summary
static CommandCompletorInterface COMPLETOR
          Command completor to use.
private  ConsoleHelperInterface helper
          Interface to the console helper.
private  VirtualDatabaseJmxClient vdjc
          Virtual database management interface.
 
Constructor Summary
VirtualDatabaseAdmin(ConsoleHelperInterface helper)
          Creates a new VirtualDatabaseAdmin instance.
 
Method Summary
 void disable(java.lang.String backendName, java.lang.String checkpointName)
          Disables the specified backend with an optional checkpoint.
 void disableAll(java.lang.String checkpointName)
          Disable all backends
 void enable(java.lang.String backendName, java.lang.String checkpointName)
          Enables the specified backend with an optional checkpoint.
 void enableAll(java.lang.String checkpointName)
          Enables all backends with an optional checkpoint.
 void handlePrompt(java.lang.String host, java.lang.String port, java.lang.String vdbName)
          Administrates a virtual database.
 void help()
          Displays help message.
 void status()
          Displays the current backend status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPLETOR

public static final CommandCompletorInterface COMPLETOR
Command completor to use.


vdjc

private VirtualDatabaseJmxClient vdjc
Virtual database management interface.


helper

private ConsoleHelperInterface helper
Interface to the console helper.

Constructor Detail

VirtualDatabaseAdmin

public VirtualDatabaseAdmin(ConsoleHelperInterface helper)
Creates a new VirtualDatabaseAdmin instance.

Parameters:
helper - console helper
Method Detail

help

public void help()
Displays help message.


enable

public void enable(java.lang.String backendName,
                   java.lang.String checkpointName)
            throws JmxException
Enables the specified backend with an optional checkpoint.

Parameters:
backendName - the backend name
checkpointName - the checkpoint name or null if none
Throws:
JmxException - if an error occurs

enableAll

public void enableAll(java.lang.String checkpointName)
               throws JmxException
Enables all backends with an optional checkpoint.

Parameters:
checkpointName - the checkpoint name or null if none
Throws:
JmxException - if an error occurs

disable

public void disable(java.lang.String backendName,
                    java.lang.String checkpointName)
             throws JmxException
Disables the specified backend with an optional checkpoint.

Parameters:
backendName - the backend name
checkpointName - the checkpoint name or null if none
Throws:
JmxException - if an error occurs

disableAll

public void disableAll(java.lang.String checkpointName)
                throws JmxException
Disable all backends

Parameters:
checkpointName - leave null if no checkpoint
Throws:
JmxException - if jmx reports an error

status

public void status()
            throws JmxException
Displays the current backend status.

Throws:
JmxException - if an error occurs

handlePrompt

public void handlePrompt(java.lang.String host,
                         java.lang.String port,
                         java.lang.String vdbName)
Administrates a virtual database.

Parameters:
vdbName - virtual database name.
host - jmx host
port - jmx port


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