org.objectweb.cjdbc.scenario.tools.components.backend
Class DatabaseManager

java.lang.Object
  extended byorg.objectweb.cjdbc.scenario.tools.components.ComponentManager
      extended byorg.objectweb.cjdbc.scenario.tools.components.backend.DatabaseManager
All Implemented Interfaces:
ComponentManagerInterface

public class DatabaseManager
extends ComponentManager

This class defines a DatabaseManager

Version:
1.0
Author:
Nicolas Modrzyk

Field Summary
static int HSQLDB
          HSQLDB processes selection
static int MYSQL
          MYSQL processes selection
private  int selection
           
 
Fields inherited from class org.objectweb.cjdbc.scenario.tools.components.ComponentManager
processes
 
Constructor Summary
DatabaseManager()
          Creates a new DatabaseManager object
DatabaseManager(int selection)
          Creates a new DatabaseManager object
 
Method Summary
 java.lang.String getDefaultConfigurationFile()
          The default configuration file to use with this component manager.
 ComponentInterface instanciateProcess(java.lang.String port, java.lang.String database)
          Instaciate a process managed by this component manager on the given port
 void stopAll()
          Stops all process contained in this manager
 
Methods inherited from class org.objectweb.cjdbc.scenario.tools.components.ComponentManager
instanciateProcess, isStarted, loaddatabase, loaddatabase, loaddatabase, release, simulateFailure, simulateFailure, start, start, startComponent, startComponent, stop, stop, stop, waitForStarted, waitForStopped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HSQLDB

public static final int HSQLDB
HSQLDB processes selection

See Also:
Constant Field Values

MYSQL

public static final int MYSQL
MYSQL processes selection

See Also:
Constant Field Values

selection

private int selection
Constructor Detail

DatabaseManager

public DatabaseManager()
Creates a new DatabaseManager object


DatabaseManager

public DatabaseManager(int selection)
Creates a new DatabaseManager object

Parameters:
selection - the process that this database manager will generate
Method Detail

instanciateProcess

public ComponentInterface instanciateProcess(java.lang.String port,
                                             java.lang.String database)
                                      throws java.lang.Exception
Description copied from class: ComponentManager
Instaciate a process managed by this component manager on the given port

Specified by:
instanciateProcess in interface ComponentManagerInterface
Specified by:
instanciateProcess in class ComponentManager
Parameters:
port - port to start the process on
database - used to instanciate the process
Returns:
a reference to the newly started component
Throws:
java.lang.Exception - if fails
See Also:
ComponentManager.instanciateProcess(java.lang.String, java.lang.String)

getDefaultConfigurationFile

public java.lang.String getDefaultConfigurationFile()
Description copied from class: ComponentManager
The default configuration file to use with this component manager. This should be specific to each component manager

Specified by:
getDefaultConfigurationFile in interface ComponentManagerInterface
Specified by:
getDefaultConfigurationFile in class ComponentManager
Returns:
the default filename
See Also:
ComponentManager.getDefaultConfigurationFile()

stopAll

public void stopAll()
Description copied from class: ComponentManager
Stops all process contained in this manager

Specified by:
stopAll in interface ComponentManagerInterface
Overrides:
stopAll in class ComponentManager
See Also:
In Linux, also kills hypersonic processes


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