org.objectweb.cjdbc.scenario.tools.components.backend.hsqldb
Class HypersonicProcess

java.lang.Object
  extended byorg.objectweb.cjdbc.scenario.tools.components.backend.hsqldb.HypersonicProcess
All Implemented Interfaces:
ComponentInterface

public class HypersonicProcess
extends java.lang.Object
implements ComponentInterface

This class defines a HyperSonicProcess

Version:
1.0
Author:
Nicolas Modrzyk

Field Summary
(package private)  java.lang.String database
           
(package private)  java.io.File dir
           
(package private)  java.lang.String jarFile
           
(package private)  java.lang.String port
           
(package private)  java.lang.Process process
           
(package private)  java.lang.String scriptFile
           
(package private)  java.lang.String templateDir
           
 
Constructor Summary
HypersonicProcess(java.lang.String port, java.lang.String database)
          Creates a new HyperSonicProcess.java object Start a new independant process
 
Method Summary
 java.lang.String getDatabase()
          Returns the database value.
 java.lang.String getPort()
          Returns the port value.
 java.lang.Object getProcess()
          Returns the process associated to this database.
 void loadDatabase()
          Loads a default file in the database
 void loadDatabase(java.lang.String templateName)
          Loads the data of the given file in the database
 void loadDatabase(java.lang.String xml, java.lang.String targetDB)
          Loads the xml file with the given target database
 void release()
          Remove files generated by this process
 void start()
          Start this component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

templateDir

java.lang.String templateDir

jarFile

java.lang.String jarFile

scriptFile

java.lang.String scriptFile

port

java.lang.String port

database

java.lang.String database

dir

java.io.File dir

process

java.lang.Process process
Constructor Detail

HypersonicProcess

public HypersonicProcess(java.lang.String port,
                         java.lang.String database)
                  throws java.io.IOException
Creates a new HyperSonicProcess.java object Start a new independant process

Parameters:
port - to start hypersonic on
database - to load by default
Throws:
java.io.IOException - if fails to start
Method Detail

start

public void start()
           throws java.io.IOException
Description copied from interface: ComponentInterface
Start this component

Specified by:
start in interface ComponentInterface
Throws:
java.io.IOException
See Also:
ComponentInterface.start()

getDatabase

public java.lang.String getDatabase()
Returns the database value.

Specified by:
getDatabase in interface ComponentInterface
Returns:
Returns the database.

getPort

public java.lang.String getPort()
Returns the port value.

Specified by:
getPort in interface ComponentInterface
Returns:
Returns the port.

loadDatabase

public void loadDatabase()
                  throws java.lang.Exception
Description copied from interface: ComponentInterface
Loads a default file in the database

Specified by:
loadDatabase in interface ComponentInterface
Throws:
java.lang.Exception - if fails
See Also:
ComponentInterface.loadDatabase()

loadDatabase

public void loadDatabase(java.lang.String templateName)
                  throws java.lang.Exception
Description copied from interface: ComponentInterface
Loads the data of the given file in the database

Specified by:
loadDatabase in interface ComponentInterface
Parameters:
templateName - to load
Throws:
java.lang.Exception - if fails
See Also:
ComponentInterface.loadDatabase(java.lang.String)

getProcess

public java.lang.Object getProcess()
Returns the process associated to this database.

Specified by:
getProcess in interface ComponentInterface
Returns:
Returns the process.

release

public void release()
Remove files generated by this process

Specified by:
release in interface ComponentInterface

loadDatabase

public void loadDatabase(java.lang.String xml,
                         java.lang.String targetDB)
                  throws java.lang.Exception
Description copied from interface: ComponentInterface
Loads the xml file with the given target database

Specified by:
loadDatabase in interface ComponentInterface
Parameters:
xml - file
targetDB - target database
Throws:
java.lang.Exception - if fails
See Also:
ComponentInterface.loadDatabase(java.lang.String, java.lang.String)


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