Brooklyn

brooklyn.entity.proxy.nginx
[Java] Class NginxSshDriver

java.lang.Object
  brooklyn.entity.basic.AbstractSoftwareProcessDriver
      brooklyn.entity.basic.AbstractSoftwareProcessSshDriver
          brooklyn.entity.proxy.nginx.NginxSshDriver
All Implemented Interfaces:
NginxDriver

public class NginxSshDriver
extends AbstractSoftwareProcessSshDriver

Start a NginxController in a Location accessible over ssh.


Field Summary
protected boolean customizationCompleted

static Logger log

 
Fields inherited from class AbstractSoftwareProcessSshDriver
BROOKLYN_HOME_DIR, CHECK_RUNNING, CUSTOMIZING, DEFAULT_INSTALL_BASEDIR, DEFAULT_RUN_BASEDIR, IGNORE_ENTITY_SSH_FLAGS, INSTALLING, KILLING, LAUNCHING, NO_VERSION_INFO, PID_FILENAME, RESTARTING, STOPPING, USE_PID_FILE, log, logSsh
 
Fields inherited from class AbstractSoftwareProcessDriver
entity, location, resource
 
Constructor Summary
NginxSshDriver(NginxControllerImpl entity, SshMachineLocation machine)

 
Method Summary
void customize()

protected void doReloadNow()

Executes the given task, but only if another thread hasn't executed it for us (where the other thread began executing it after the current caller of run() began attempting to do so itself).

NginxControllerImpl getEntity()

protected java.lang.Integer getHttpPort()

protected java.lang.String getLogFileLocation()

void install()

boolean isCustomizationCompleted()

boolean isRunning()

void kill()

void launch()

void postLaunch()

void rebind()

void reload()

void stop()

static java.lang.String sudoBashCIfPrivilegedPort(int port, java.lang.String command)

static java.lang.String sudoIfPrivilegedPort(int port, java.lang.String command)

 
Methods inherited from class AbstractSoftwareProcessSshDriver
copyFile, copyFile, copyFile, copyResource, copyResource, copyResource, copyResources, copyTemplate, copyTemplate, copyTemplate, copyTemplates, execute, execute, getAddress, getDefaultVersion, getDownloadFileSuffix, getDownloadFilename, getEntityVersionLabel, getEntityVersionLabel, getHostname, getInstallDir, getLocation, getMachine, getPortsUsed, getRunDir, getShellEnvironment, getSshFlags, getVersion, newScript, newScript
 
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

customizationCompleted

protected boolean customizationCompleted


log

public static final Logger log


 
Constructor Detail

NginxSshDriver

public NginxSshDriver(NginxControllerImpl entity, SshMachineLocation machine)


 
Method Detail

customize

}
public void customize()


doReloadNow

protected void doReloadNow()
Executes the given task, but only if another thread hasn't executed it for us (where the other thread began executing it after the current caller of run() began attempting to do so itself).
Authors:
aled


getEntity

public NginxControllerImpl getEntity()


getHttpPort

protected java.lang.Integer getHttpPort()


getLogFileLocation

protected java.lang.String getLogFileLocation()


install

false)).orSubmitAndBlock();
public void install()


isCustomizationCompleted

public boolean isCustomizationCompleted()


isRunning

).execute();
public boolean isRunning()


kill

// bad because the ssh commands take a second or two - if 10 changes were made to the config in that time, we'd
public void kill()


launch

// We wait for evidence of running because, using
public void launch()


postLaunch

}
public void postLaunch()


rebind

public void rebind()


reload

public void reload()


stop

}
public void stop()


sudoBashCIfPrivilegedPort

public static java.lang.String sudoBashCIfPrivilegedPort(int port, java.lang.String command)


sudoIfPrivilegedPort

public static java.lang.String sudoIfPrivilegedPort(int port, java.lang.String command)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.