|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.entity.basic.AbstractSoftwareProcessDriver
brooklyn.entity.basic.AbstractSoftwareProcessSshDriver
public abstract class AbstractSoftwareProcessSshDriver extends AbstractSoftwareProcessDriver
An abstract SSH implementation of the AbstractSoftwareProcessDriver. This provides conveniences for clients implementing the install/customize/launch/isRunning/stop lifecycle over SSH. These conveniences include checking whether software is already installed, creating/using a PID file for some operations, and reading ssh-specific config from the entity to override/augment ssh flags on the session.
Field Summary | |
---|---|
static java.lang.String |
BROOKLYN_HOME_DIR
|
protected static java.lang.String |
CHECK_RUNNING
|
protected static java.lang.String |
CUSTOMIZING
|
static java.lang.String |
DEFAULT_INSTALL_BASEDIR
|
static java.lang.String |
DEFAULT_RUN_BASEDIR
|
static java.lang.String |
IGNORE_ENTITY_SSH_FLAGS
include this flag in newScript creation to prevent entity-level flags from being included; any SSH-specific flags passed to newScript override flags from the entity, and flags from the entity override flags on the location (where there aren't conflicts, flags from all three are used however) |
protected static java.lang.String |
INSTALLING
|
protected static java.lang.String |
KILLING
|
protected static java.lang.String |
LAUNCHING
|
static java.lang.String |
NO_VERSION_INFO
|
static java.lang.String |
PID_FILENAME
|
protected static java.lang.String |
RESTARTING
|
protected static java.lang.String |
STOPPING
|
protected static java.lang.String |
USE_PID_FILE
|
static Logger |
log
|
static Logger |
logSsh
|
Fields inherited from class AbstractSoftwareProcessDriver | |
---|---|
entity, location, resource |
Constructor Summary | |
AbstractSoftwareProcessSshDriver(EntityLocal entity, SshMachineLocation machine)
|
Method Summary | |
---|---|
void
|
copyFile(java.io.File src, java.lang.String destination)
@deprecated since 0.5.0, destination should be a string not a File |
void
|
copyFile(java.io.File src, java.io.File destination)
@deprecated since 0.5.0, should use copyResource(java.util.Map, java.lang.String, java.lang.String). |
void
|
copyFile(java.util.Map flags2, java.io.File src, java.lang.String destination)
|
int
|
copyResource(java.io.File file, java.lang.String target)
|
int
|
copyResource(java.lang.String resource, java.lang.String target)
|
int
|
copyResource(java.util.Map flags2, java.lang.String resource, java.lang.String target)
|
void
|
copyResources(java.util.Map resources)
|
int
|
copyTemplate(java.io.File template, java.lang.String target)
|
int
|
copyTemplate(java.lang.String template, java.lang.String target)
|
int
|
copyTemplate(java.lang.String template, java.lang.String target, java.util.Map extraSubstitutions)
|
void
|
copyTemplates(java.util.Map templates)
|
int
|
execute(java.util.List script, java.lang.String summaryForLogging)
|
int
|
execute(java.util.Map flags2, java.util.List script, java.lang.String summaryForLogging)
|
java.lang.String
|
getAddress()
|
protected java.lang.String
|
getDefaultVersion()
|
java.lang.String
|
getDownloadFileSuffix()
Suffix to use when looking up the file in the local repo. |
java.lang.String
|
getDownloadFilename()
Name to be used in the local repo, when looking for the download file. |
protected java.lang.String
|
getEntityVersionLabel()
@deprecated since 0.5.0; instead rely on DownloadResolverManager to include local-repo, such as: |
protected java.lang.String
|
getEntityVersionLabel(java.lang.String separator)
@deprecated since 0.5.0; instead rely on DownloadResolverManager to include local-repo |
java.lang.String
|
getHostname()
|
java.lang.String
|
getInstallDir()
|
SshMachineLocation
|
getLocation()
returns location (tighten type, since we know it is an ssh machine location here) |
SshMachineLocation
|
getMachine()
|
java.util.Set
|
getPortsUsed()
|
java.lang.String
|
getRunDir()
|
java.util.Map
|
getShellEnvironment()
The environment variables to be set when executing the commands (for install, run, check running, etc). |
protected java.util.Map
|
getSshFlags()
|
java.lang.String
|
getVersion()
|
protected ScriptHelper
|
newScript(java.lang.String phase)
|
protected ScriptHelper
|
newScript(java.util.Map flags, java.lang.String phase)
|
Methods inherited from class AbstractSoftwareProcessDriver | |
---|---|
customize, doFullStartOnRestart, getEntity, getLocation, getResource, getResourceAsString, install, kill, launch, postLaunch, processTemplate, processTemplate, processTemplate, processTemplate, processTemplateContents, processTemplateContents, rebind, restart, start, stop, waitForConfigKey |
Field Detail |
---|
public static final java.lang.String BROOKLYN_HOME_DIR
protected static final java.lang.String CHECK_RUNNING
protected static final java.lang.String CUSTOMIZING
public static final java.lang.String DEFAULT_INSTALL_BASEDIR
public static final java.lang.String DEFAULT_RUN_BASEDIR
public static final java.lang.String IGNORE_ENTITY_SSH_FLAGS
protected static final java.lang.String INSTALLING
protected static final java.lang.String KILLING
protected static final java.lang.String LAUNCHING
public static final java.lang.String NO_VERSION_INFO
public static final java.lang.String PID_FILENAME
protected static final java.lang.String RESTARTING
protected static final java.lang.String STOPPING
protected static final java.lang.String USE_PID_FILE
public static final Logger log
public static final Logger logSsh
Constructor Detail |
---|
public AbstractSoftwareProcessSshDriver(EntityLocal entity, SshMachineLocation machine)
Method Detail |
---|
@Deprecated public void copyFile(java.io.File src, java.lang.String destination)
@Deprecated public void copyFile(java.io.File src, java.io.File destination)
flags.putAll(getSshFlags()); flags.putAll(flags2); public void copyFile(java.util.Map flags2, java.io.File src, java.lang.String destination)
public int copyResource(java.io.File file, java.lang.String target)
public int copyResource(java.lang.String resource, java.lang.String target)
public int copyResource(java.util.Map flags2, java.lang.String resource, java.lang.String target)
public void copyResources(java.util.Map resources)
public int copyTemplate(java.io.File template, java.lang.String target)
public int copyTemplate(java.lang.String template, java.lang.String target)
public int copyTemplate(java.lang.String template, java.lang.String target, java.util.Map extraSubstitutions)
public void copyTemplates(java.util.Map templates)
public int execute(java.util.List script, java.lang.String summaryForLogging)
flags.putAll(getSshFlags()); flags.putAll(flags2); public int execute(java.util.Map flags2, java.util.List script, java.lang.String summaryForLogging)
public java.lang.String getAddress()
protected java.lang.String getDefaultVersion()
public java.lang.String getDownloadFileSuffix()
public java.lang.String getDownloadFilename()
protected java.lang.String getEntityVersionLabel()
DownloadResolver resolver = entity.getManagementContext().getEntityDownloadsManager().resolve(this); Listurls = resolver.getTargets();
protected java.lang.String getEntityVersionLabel(java.lang.String separator)
public java.lang.String getHostname()
public java.lang.String getInstallDir()
public SshMachineLocation getLocation()
public SshMachineLocation getMachine()
public java.util.Set getPortsUsed()
public java.lang.String getRunDir()
public java.util.Map getShellEnvironment()
protected java.util.Map getSshFlags()
public java.lang.String getVersion()
protected ScriptHelper newScript(java.lang.String phase)
protected ScriptHelper newScript(java.util.Map flags, java.lang.String phase)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.