public abstract class AbstractSoftwareProcessDriver extends java.lang.Object implements SoftwareProcessDriver
SoftwareProcessDriver.| Constructor and Description | 
|---|
| AbstractSoftwareProcessDriver(EntityLocal entity,
                             Location location) | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract void | copyInstallResources() | 
| abstract void | copyRuntimeResources() | 
| abstract void | customize() | 
| EntityLocal | getEntity()The entity whose components we are controlling. | 
| Location | getLocation()The location the entity is running in. | 
| java.io.InputStream | getResource(java.lang.String url) | 
| java.lang.String | getResourceAsString(java.lang.String url) | 
| abstract void | install() | 
| void | kill()Kills the process, ungracefully and immediately where possible (e.g. | 
| abstract void | launch() | 
| void | postLaunch()Implement this method in child classes to add some post-launch behavior | 
| void | preInstall()Implement this method in child classes to add some post-launch behavior | 
| java.lang.String | processTemplate(java.io.File templateConfigFile) | 
| java.lang.String | processTemplate(java.io.File templateConfigFile,
               java.util.Map<java.lang.String,java.lang.Object> extraSubstitutions) | 
| java.lang.String | processTemplate(java.lang.String templateConfigUrl)Takes the contents of a template file from the given URL (often a classpath://com/myco/myprod/myfile.conf or .sh)
 and replaces "${entity.xxx}" with the result of entity.getXxx() and similar for other driver, location;
 as well as replacing config keys on the management context | 
| java.lang.String | processTemplate(java.lang.String templateConfigUrl,
               java.util.Map<java.lang.String,? extends java.lang.Object> extraSubstitutions) | 
| java.lang.String | processTemplateContents(java.lang.String templateContents) | 
| java.lang.String | processTemplateContents(java.lang.String templateContents,
                       java.util.Map<java.lang.String,? extends java.lang.Object> extraSubstitutions) | 
| void | rebind()Rebinds the driver to a pre-existing software process. | 
| void | restart()Performs software restart (or queues tasks to do this). | 
| abstract void | runPostInstallCommand(java.lang.String command) | 
| abstract void | runPostLaunchCommand(java.lang.String command) | 
| abstract void | runPreInstallCommand(java.lang.String command) | 
| abstract void | runPreLaunchCommand(java.lang.String command) | 
| abstract void | setup() | 
| void | start()Start the entity. | 
| abstract void | stop()Performs software stop (or queues tasks to do this) | 
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisRunningpublic AbstractSoftwareProcessDriver(EntityLocal entity, Location location)
public void rebind()
SoftwareProcessDriverrebind in interface SoftwareProcessDriverpublic void start()
 This installs, configures and launches the application process. However,
 users can also call the install(), customize() and
 launch() steps independently. The postLaunch() will
 be called after the launch() metheod is executed, but the
 process may not be completely initialised at this stage, so care is
 required when implementing these stages.
start in interface SoftwareProcessDriverstop()public abstract void stop()
SoftwareProcessDriverstop in interface SoftwareProcessDriverStartable.stop()public void preInstall()
public abstract void runPreInstallCommand(java.lang.String command)
public abstract void setup()
public abstract void copyInstallResources()
public abstract void install()
public abstract void runPostInstallCommand(java.lang.String command)
public abstract void copyRuntimeResources()
public abstract void customize()
public abstract void runPreLaunchCommand(java.lang.String command)
public abstract void launch()
public abstract void runPostLaunchCommand(java.lang.String command)
public void kill()
SoftwareProcessDriverkill in interface SoftwareProcessDriverpublic void postLaunch()
public void restart()
SoftwareProcessDriverrestart in interface SoftwareProcessDriverStartable.restart()public EntityLocal getEntity()
SoftwareProcessDrivergetEntity in interface SoftwareProcessDrivergetEntity in interface EntityDriverpublic Location getLocation()
EntityDrivergetLocation in interface EntityDriverpublic java.io.InputStream getResource(java.lang.String url)
public java.lang.String getResourceAsString(java.lang.String url)
public java.lang.String processTemplate(java.io.File templateConfigFile,
                               java.util.Map<java.lang.String,java.lang.Object> extraSubstitutions)
public java.lang.String processTemplate(java.io.File templateConfigFile)
public java.lang.String processTemplate(java.lang.String templateConfigUrl)
uses Freemarker templates under the covers
public java.lang.String processTemplate(java.lang.String templateConfigUrl,
                               java.util.Map<java.lang.String,? extends java.lang.Object> extraSubstitutions)
public java.lang.String processTemplateContents(java.lang.String templateContents)
public java.lang.String processTemplateContents(java.lang.String templateContents,
                                       java.util.Map<java.lang.String,? extends java.lang.Object> extraSubstitutions)