|
||||||||||
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.LinuxMachine
public class LinuxMachine
A LinuxMachine is the instance of the abstract machine class, which runs the operating system Linux or another Unix dependent operation system. 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 | |
---|---|
LinuxMachine(org.dom4j.Element subTreeRoot,
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 dir)
Dummy function on linux machine. |
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 script for restarting all the applications on a machine. |
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 |
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()
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-configuration 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. |
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 LinuxMachine(org.dom4j.Element subTreeRoot, XmlStructure parentSettings, Parameters param, java.lang.String netarchiveSuiteSource, java.io.File logProp, java.io.File securityPolicy, java.io.File dbFile, boolean resetDir)
subTreeRoot
- 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 end with '.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 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?).protected java.lang.String osGetClassPath(Application app)
osGetClassPath
in class Machine
app
- The application which has the class paths.
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 void createInstallDirScript(java.io.File dir)
createInstallDirScript
in class Machine
dir
- The directory to put the file.protected 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |