|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.deploy.Machine dk.netarkivet.deploy.WindowsMachine
public class WindowsMachine
A WindowsMachine is the instance of the abstract machine class, which runs the operating system Windows. This class only contains the operating system specific functions.
Field Summary |
---|
Fields inherited from class dk.netarkivet.deploy.Machine |
---|
applications, arcDatabaseFile, databaseFile, inheritedLogPropFile, inheritedSecurityPolicyFile, jarFolder, log, machineDirectory, machineParameters, machineRoot, name, netarchiveSuiteFileName, operatingSystem, resetTempDir, scriptExtension, settings |
Constructor Summary | |
---|---|
WindowsMachine(org.dom4j.Element root,
XmlStructure parentSettings,
Parameters param,
java.lang.String netarchiveSuiteSource,
java.io.File logProp,
java.io.File securityPolicy,
java.io.File dbFile,
java.io.File arcdbFile,
boolean resetDir,
java.io.File externalJarFolder)
The constructor. |
Method Summary | |
---|---|
protected java.lang.String |
changeFileDirPathForSecurity(java.lang.String path)
Changes the file directory path to the format used in the security policy. |
protected void |
createApplicationKillScripts(java.io.File directory)
Creates the kill scripts for all the applications. |
protected void |
createApplicationStartScripts(java.io.File directory)
Creates the start scripts for all the applications. |
protected void |
createArchiveDatabaseKillScript(java.io.File dir)
Creates a script for killing the archive database on a given machine. |
protected void |
createArchiveDatabaseStartScript(java.io.File dir)
Creates a script for starting the archive database on a given machine. |
protected void |
createHarvestDatabaseKillScript(java.io.File dir)
Creates a script for killing the harvest database on a given machine. |
protected void |
createHarvestDatabaseStartScript(java.io.File dir)
Creates a script for starting the harvest database on a given machine. |
protected void |
createInstallDirScript(java.io.File directory)
Function to create the script which installs the new directories. |
protected void |
createOSLocalKillAllScript(java.io.File directory)
This function creates the script to kill all applications on this machine. |
protected void |
createOSLocalStartAllScript(java.io.File directory)
This function creates the script to start all applications on this machine. |
protected java.lang.String |
createPathToDir(java.lang.String dir)
Function for creating the directories along the path until the end directory. |
protected void |
createRestartScript(java.io.File dir)
Creates scripts for restarting all the applications on a machine. |
protected void |
createWaitScript(java.io.File dir)
Creates the script for waiting during restart. |
protected java.lang.String |
getAppDirectories()
Creates the script for creating the application specified directories. |
protected java.lang.String |
getConfDirPath()
The operation system specific path to the conf directory. |
protected java.lang.String |
getInstallDirPath()
The operation system specific path to the installation directory. |
protected java.lang.String |
getJMXremoteFilesCommand()
This method does the following: Retrieves the path to the jmxremote.access and jmxremote.password files. |
protected java.lang.String |
getLocalConfDirPath()
Creates the local path to the conf dir. |
protected java.lang.String |
getLocalInstallDirPath()
Creates the local path to the installation directory. |
protected java.lang.String |
getMakeDirectoryName()
Creates the name for the make dir script. |
protected java.lang.String |
osGetClassPath(Application app)
Makes all the class paths into the operation system specific syntax, and puts them into a string where they are separated by the operation system specific separator (':' for linux, ';' for windows). |
protected java.lang.String |
osInstallArchiveDatabase()
THIS HAS NOT BEEN IMPLEMENTED FOR WINDOWS YET - ONLY LINUX! Checks if a specific directory for the archive database is given in the settings, and thus if the archive database should be installed on this machine. |
protected java.lang.String |
osInstallDatabase()
THIS HAS NOT BEEN IMPLEMENTED FOR WINDOWS YET - ONLY LINUX! Checks if a specific directory for the database is given in the settings, and thus if the database should be installed on this machine. |
protected java.lang.String |
osInstallExternalJarFiles()
This function makes the part of the install script for installing the external jar files from within the jarFolder. |
protected java.lang.String |
osInstallScript()
Creates the operation system specific installation script for this machine. |
protected java.lang.String |
osInstallScriptCreateDir()
Creates the specified directories in the deploy config file. |
protected java.lang.String |
osKillScript()
Creates the operation system specific killing script for this machine. |
protected java.lang.String |
osStartScript()
Creates the operation system specific starting script for this machine. |
protected java.lang.String |
scriptCreateDir(java.lang.String dir,
boolean clean)
This functions makes the script for creating the new directories. |
protected void |
windowsStartBatScript(Application app,
java.io.File directory)
Creates the batch script for starting the application. |
protected void |
windowsStartVbsScript(Application app,
java.io.File directory)
This function creates the VBscript to start the application. |
Methods inherited from class dk.netarkivet.deploy.Machine |
---|
createJmxRemoteAccessFile, createJmxRemotePasswordFile, createLogPropertyFiles, createSecurityPolicyFile, getEnvironmentName, getHeritrixLogin, getHeritrixUsername, getMonitorLogin, getMonitorUsername, machineUserLogin, write, writeToGlobalInstallScript, writeToGlobalKillScript, writeToGlobalStartScript |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WindowsMachine(org.dom4j.Element root, XmlStructure parentSettings, Parameters param, java.lang.String netarchiveSuiteSource, java.io.File logProp, java.io.File securityPolicy, java.io.File dbFile, java.io.File arcdbFile, boolean resetDir, java.io.File externalJarFolder)
root
- The XML root element.parentSettings
- The Settings to be inherited from the
PhysicalLocation, where this machine is placed.param
- The machine parameters to be inherited from the
PhysicalLocation.netarchiveSuiteSource
- The name of the NetarchiveSuite package
file. Must be '.zip'.logProp
- The logging property file, to be copied into
machine directory.securityPolicy
- The security policy file, to be copied into
machine directory.dbFile
- The harvest definition database file.arcdbFile
- The archive database.resetDir
- Whether the temporary directory should be reset.externalJarFolder
- The folder containing the external jar
library files.Method Detail |
---|
protected java.lang.String osInstallScript()
osInstallScript
in class Machine
protected java.lang.String osKillScript()
osKillScript
in class Machine
protected java.lang.String osStartScript()
osStartScript
in class Machine
protected java.lang.String getInstallDirPath()
Machine
getInstallDirPath
in class Machine
protected java.lang.String getConfDirPath()
Machine
getConfDirPath
in class Machine
protected java.lang.String getLocalConfDirPath()
protected java.lang.String getLocalInstallDirPath()
protected void createOSLocalKillAllScript(java.io.File directory) throws IOFailure
createOSLocalKillAllScript
in class Machine
directory
- The directory for this machine (use global variable?).
IOFailure
- If an error occurred during the creation of the local
killall script.protected void createOSLocalStartAllScript(java.io.File directory) throws IOFailure
createOSLocalStartAllScript
in class Machine
directory
- The directory for this machine (use global variable?).
IOFailure
- If an error occurred during the creation of the local
startall script.protected void createApplicationKillScripts(java.io.File directory) throws IOFailure
createApplicationKillScripts
in class Machine
directory
- The directory for this machine (use global variable?).
IOFailure
- If an error occurred during the creation of the
application kill script file.protected void createApplicationStartScripts(java.io.File directory)
createApplicationStartScripts
in class Machine
directory
- The directory for this machine (use global variable?).windowsStartBatScript(Application, File)
,
windowsStartVbsScript(Application, File)
protected java.lang.String osGetClassPath(Application app)
Machine
osGetClassPath
in class Machine
app
- The application which has the class paths.
protected void windowsStartBatScript(Application app, java.io.File directory) throws IOFailure
app
- The application to start.directory
- The directory where the script should be placed.
IOFailure
- If an error occurred during the creation of the
windows start bat script.protected void windowsStartVbsScript(Application app, java.io.File directory) throws IOFailure
app
- The application to start.directory
- The directory where the script should be placed.
IOFailure
- If an error occurred during the creation of the
windows vb script.protected java.lang.String osInstallDatabase()
osInstallDatabase
in class Machine
protected java.lang.String osInstallArchiveDatabase()
osInstallArchiveDatabase
in class Machine
protected java.lang.String osInstallExternalJarFiles()
Machine
osInstallExternalJarFiles
in class Machine
protected java.lang.String osInstallScriptCreateDir()
osInstallScriptCreateDir
in class Machine
protected java.lang.String scriptCreateDir(java.lang.String dir, boolean clean)
Machine
scriptCreateDir
in class Machine
dir
- The name of the directory to create.clean
- Whether the directory should be cleaned\reset.
Machine.createInstallDirScript(File)
protected java.lang.String createPathToDir(java.lang.String dir)
dir
- The path to the directory.
protected java.lang.String getAppDirectories()
Machine
getAppDirectories
in class Machine
protected java.lang.String getMakeDirectoryName()
protected void createInstallDirScript(java.io.File directory) throws IOFailure
createInstallDirScript
in class Machine
directory
- The directory to put the file.
IOFailure
- If an error occurred during the creation of the
install-dir script.protected java.lang.String changeFileDirPathForSecurity(java.lang.String path)
Machine
changeFileDirPathForSecurity
in class Machine
path
- The current path.
protected java.lang.String getJMXremoteFilesCommand()
getJMXremoteFilesCommand
in class Machine
protected void createRestartScript(java.io.File dir) throws IOFailure
createRestartScript
in class Machine
dir
- The directory where the script file will be placed.
IOFailure
- If the restart script cannot be created, or if the
wait script cannot be created.protected void createWaitScript(java.io.File dir) throws IOFailure
dir
- The directory where the script should be placed.
IOFailure
- If the method fails in creating the wait script.protected void createArchiveDatabaseStartScript(java.io.File dir)
Machine
createArchiveDatabaseStartScript
in class Machine
dir
- The directory where the script will be placed.protected void createArchiveDatabaseKillScript(java.io.File dir)
Machine
createArchiveDatabaseKillScript
in class Machine
dir
- The directory where the script will be placed.protected void createHarvestDatabaseStartScript(java.io.File dir)
Machine
createHarvestDatabaseStartScript
in class Machine
dir
- The directory where the script will be placed.protected void createHarvestDatabaseKillScript(java.io.File dir)
Machine
createHarvestDatabaseKillScript
in class Machine
dir
- The directory where the script will be placed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |