|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.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, databaseFile, inheritedLogPropFile, inheritedSecurityPolicyFile, log, machineDirectory, machineParameters, machineRoot, name, netarchiveSuiteFileName, operatingSystem, resetTempDir, scriptExtension, settings |
Constructor Summary | |
---|---|
WindowsMachine(org.dom4j.Element e,
XmlStructure parentSettings,
Parameters param,
java.lang.String netarchiveSuiteSource,
java.io.File logProp,
java.io.File securityPolicy,
java.io.File dbFile,
boolean resetDir)
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 |
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 |
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 |
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 e, XmlStructure parentSettings, Parameters param, java.lang.String netarchiveSuiteSource, java.io.File logProp, java.io.File securityPolicy, java.io.File dbFile, boolean resetDir)
e
- 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 name of the database file.resetDir
- Whether the temporary directory should be reset.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()
getInstallDirPath
in class Machine
protected java.lang.String getConfDirPath()
getConfDirPath
in class Machine
protected java.lang.String getLocalConfDirPath()
protected java.lang.String getLocalInstallDirPath()
protected void createOSLocalKillAllScript(java.io.File directory)
createOSLocalKillAllScript
in class Machine
directory
- The directory for this machine (use global variable?).protected void createOSLocalStartAllScript(java.io.File directory)
createOSLocalStartAllScript
in class Machine
directory
- The directory for this machine (use global variable?).protected void createApplicationKillScripts(java.io.File directory)
createApplicationKillScripts
in class Machine
directory
- The directory for this machine (use global variable?).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)
osGetClassPath
in class Machine
app
- The application which has the class paths.
protected void windowsStartBatScript(Application app, java.io.File directory)
app
- The application to start.directory
- The directory where the script should be placed.protected void windowsStartVbsScript(Application app, java.io.File directory)
app
- The application to start.directory
- The directory where the script should be placed.protected java.lang.String osInstallDatabase()
osInstallDatabase
in class Machine
protected java.lang.String osInstallScriptCreateDir()
osInstallScriptCreateDir
in class Machine
protected java.lang.String scriptCreateDir(java.lang.String dir, boolean clean)
scriptCreateDir
in class Machine
dir
- The name of the directory to create.clean
- Whether the directory should be cleaned\reset.
createInstallDirScript(File)
protected java.lang.String createPathToDir(java.lang.String dir)
dir
- The path to the directory.
protected java.lang.String getAppDirectories()
getAppDirectories
in class Machine
protected java.lang.String getMakeDirectoryName()
protected void createInstallDirScript(java.io.File directory)
createInstallDirScript
in class Machine
directory
- The directory to put the fileprotected java.lang.String changeFileDirPathForSecurity(java.lang.String path)
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |