public class ProcessManagerImpl extends java.lang.Object implements ProcessManager
| Constructor and Description |
|---|
ProcessManagerImpl() |
ProcessManagerImpl(java.io.File storageLocation) |
| Modifier and Type | Method and Description |
|---|---|
protected ProcessController |
createController(int id,
ProcessConfig config,
java.io.File rootDir,
java.io.File installDir) |
protected Installation |
createInstallation(int id,
java.io.File rootDir,
ProcessConfig config) |
protected java.io.File |
createInstallDir(int id) |
protected int |
createNextId()
Returns the next process ID
|
protected java.io.File |
findInstallDir(java.io.File rootDir)
Lets find the install dir, which may be the root dir or could be a child directory (as typically untarring will create a new child directory)
|
java.util.concurrent.Executor |
getExecutor() |
java.io.File |
getStorageLocation() |
void |
init() |
Installation |
install(java.lang.String url,
java.net.URL controllerJson)
Installs a process with an optional URL of the controller JSON
|
protected boolean |
installExists(java.io.File file) |
Installation |
installJar(JarInstallParameters parameters)
Installs an executable jar as a new managed process
|
protected Installation |
installViaScript(java.net.URL controllerJson,
InstallScript installScript) |
com.google.common.collect.ImmutableMap<java.lang.Integer,Installation> |
listInstallationMap() |
com.google.common.collect.ImmutableList<Installation> |
listInstallations()
Returns the current installed processes which may or may not be running right now
|
protected ProcessConfig |
loadControllerJson(java.net.URL controllerJson) |
void |
setExecutor(java.util.concurrent.Executor executor) |
void |
setStorageLocation(java.io.File storageLocation) |
java.lang.String |
toString() |
protected void |
untarTarball(java.lang.String url,
java.io.File installDir) |
public ProcessManagerImpl()
public ProcessManagerImpl(java.io.File storageLocation)
public void init()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic com.google.common.collect.ImmutableList<Installation> listInstallations()
ProcessManagerlistInstallations in interface ProcessManagerpublic com.google.common.collect.ImmutableMap<java.lang.Integer,Installation> listInstallationMap()
listInstallationMap in interface ProcessManagerpublic Installation install(java.lang.String url, java.net.URL controllerJson) throws java.lang.Exception
ProcessManagerinstall in interface ProcessManagerjava.lang.Exceptionpublic Installation installJar(JarInstallParameters parameters) throws java.lang.Exception
ProcessManagerinstallJar in interface ProcessManagerjava.lang.Exceptionpublic java.io.File getStorageLocation()
public void setStorageLocation(java.io.File storageLocation)
public java.util.concurrent.Executor getExecutor()
public void setExecutor(java.util.concurrent.Executor executor)
protected Installation installViaScript(java.net.URL controllerJson, InstallScript installScript) throws java.lang.Exception
java.lang.Exceptionprotected void untarTarball(java.lang.String url,
java.io.File installDir)
throws java.io.IOException,
CommandFailedException
java.io.IOExceptionCommandFailedExceptionprotected ProcessConfig loadControllerJson(java.net.URL controllerJson) throws java.io.IOException
java.io.IOExceptionprotected int createNextId()
protected java.io.File createInstallDir(int id)
protected Installation createInstallation(int id, java.io.File rootDir, ProcessConfig config)
protected ProcessController createController(int id, ProcessConfig config, java.io.File rootDir, java.io.File installDir)
protected java.io.File findInstallDir(java.io.File rootDir)
protected boolean installExists(java.io.File file)
Copyright © 2014 Red Hat. All Rights Reserved.