public class ProcessManagerService extends java.lang.Object implements ProcessManagerServiceMBean
Constructor and Description |
---|
ProcessManagerService() |
ProcessManagerService(java.io.File storageLocation) |
Modifier and Type | Method and Description |
---|---|
void |
bindMBeanServer(javax.management.MBeanServer mbeanServer) |
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 void |
downloadContent(java.net.URL url,
java.io.File installDir) |
java.util.concurrent.Executor |
getExecutor() |
java.io.File |
getStorageLocation() |
void |
init() |
Installation |
install(InstallOptions options,
InstallTask postInstall)
Installs a process with an optional URL of the controller JSON
together with an optional install step
|
Installation |
installJar(InstallOptions parameters)
Installs an executable jar as a new managed process
|
protected Installation |
installViaScript(java.net.URL controllerUrl,
InstallTask installTask) |
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 |
registerMBeanServer(javax.management.MBeanServer mbeanServer) |
void |
setExecutor(java.util.concurrent.Executor executor) |
void |
setStorageLocation(java.io.File storageLocation) |
java.lang.String |
toString() |
void |
unbindMBeanServer(javax.management.MBeanServer mbeanServer) |
void |
unregisterMBeanServer(javax.management.MBeanServer mbeanServer) |
public ProcessManagerService() throws javax.management.MalformedObjectNameException
javax.management.MalformedObjectNameException
public ProcessManagerService(java.io.File storageLocation) throws javax.management.MalformedObjectNameException
javax.management.MalformedObjectNameException
public void bindMBeanServer(javax.management.MBeanServer mbeanServer)
public void unbindMBeanServer(javax.management.MBeanServer mbeanServer)
public void registerMBeanServer(javax.management.MBeanServer mbeanServer)
public void unregisterMBeanServer(javax.management.MBeanServer mbeanServer)
public void init() throws java.lang.Exception
java.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object
public com.google.common.collect.ImmutableList<Installation> listInstallations()
ProcessManager
listInstallations
in interface ProcessManager
public com.google.common.collect.ImmutableMap<java.lang.Integer,Installation> listInstallationMap()
listInstallationMap
in interface ProcessManager
public Installation install(InstallOptions options, InstallTask postInstall) throws java.lang.Exception
ProcessManager
install
in interface ProcessManager
java.lang.Exception
public Installation installJar(InstallOptions parameters) throws java.lang.Exception
ProcessManager
installJar
in interface ProcessManager
java.lang.Exception
public 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 controllerUrl, InstallTask installTask) throws java.lang.Exception
java.lang.Exception
protected void downloadContent(java.net.URL url, java.io.File installDir) throws java.io.IOException, CommandFailedException
java.io.IOException
CommandFailedException
protected ProcessConfig loadControllerJson(java.net.URL controllerJson) throws java.io.IOException
java.io.IOException
protected 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)
Copyright © 2016 Red Hat. All Rights Reserved.