public class NginxSshDriver extends AbstractSoftwareProcessSshDriver implements NginxDriver
NginxController in a Location accessible over ssh.| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
log |
static java.lang.String |
NGINX_PID_FILE |
CHECK_RUNNING, CUSTOMIZING, DEBUG, IGNORE_ENTITY_SSH_FLAGS, INSTALL_INCOMPLETE, INSTALLING, KILLING, LAUNCHING, logSsh, NON_STANDARD_LAYOUT, PID_FILENAME, PROCESS_OWNER, RESTARTING, STOPPING, USE_PID_FILE, VALID_FLAGS| Constructor and Description |
|---|
NginxSshDriver(NginxControllerImpl entity,
SshMachineLocation machine) |
| Modifier and Type | Method and Description |
|---|---|
void |
customize()
Implementations should fail if the return code is non-zero, by throwing some appropriate exception.
|
java.lang.String |
getAccessLogLocation() |
NginxControllerImpl |
getEntity()
The entity whose components we are controlling.
|
java.lang.String |
getErrorLogLocation() |
java.lang.Integer |
getHttpPort()
Deprecated.
|
java.lang.String |
getLogFileLocation() |
java.lang.String |
getPidFile()
By default Nginx writes the pid of the master process to
logs/nginx.pid |
java.lang.Integer |
getPort() |
void |
install()
Implementations should fail if the return code is non-zero, by throwing some appropriate exception.
|
boolean |
isCustomizationCompleted() |
boolean |
isRunning()
Whether the entity components have started.
|
void |
kill()
Kills the process, ungracefully and immediately where possible (e.g.
|
void |
launch()
Implementations should fail if the return code is non-zero, by throwing some appropriate exception.
|
void |
postLaunch()
Implement this method in child classes to add some post-launch behavior.
|
void |
rebind()
Rebinds the driver to a pre-existing software process.
|
void |
reload() |
void |
stop()
Performs software stop (or queues tasks to do this)
|
static java.lang.String |
sudoBashCIfPrivilegedPort(int port,
java.lang.String command) |
static java.lang.String |
sudoIfPrivilegedPort(int port,
java.lang.String command) |
checkNoHostnameBug, copyCustomizeResources, copyInstallResources, copyPreInstallResources, copyResource, copyResource, execute, execute, execute, getAddress, getHostname, getLocation, getMachine, getPortsUsed, getSubnetAddress, getSubnetHostname, prepare, runPostCustomizeCommand, runPostInstallCommand, runPostLaunchCommand, runPreCustomizeCommand, runPreInstallCommand, runPreLaunchCommand, setupcopyResource, copyResource, copyResource, copyResource, copyResource, copyResource, copyResource, copyRuntimeResources, copyTemplate, copyTemplate, copyTemplate, getArchiveNameFormat, getExpandedInstallDir, getInstallDir, getResource, getResourceAsString, getRunDir, getShellEnvironment, getVersion, preInstall, processTemplate, processTemplate, processTemplate, processTemplate, processTemplateContents, processTemplateContents, restart, setExpandedInstallDir, startequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRunDirrestart, startgetLocationpublic static final org.slf4j.Logger log
public static final java.lang.String NGINX_PID_FILE
public NginxSshDriver(NginxControllerImpl entity, SshMachineLocation machine)
public NginxControllerImpl getEntity()
SoftwareProcessDrivergetEntity in interface EntityDrivergetEntity in interface SoftwareProcessDrivergetEntity in class AbstractSoftwareProcessDriverpublic java.lang.String getLogFileLocation()
public java.lang.String getAccessLogLocation()
public java.lang.String getErrorLogLocation()
public java.lang.String getPidFile()
logs/nginx.pidgetPidFile in interface NginxDriver@Deprecated public java.lang.Integer getHttpPort()
public java.lang.Integer getPort()
public void rebind()
SoftwareProcessDriverrebind in interface SoftwareProcessDriverrebind in class AbstractSoftwareProcessDriverpublic void postLaunch()
AbstractSoftwareProcessDriverpostLaunch in class AbstractSoftwareProcessDriverpublic void install()
AbstractSoftwareProcessDriverinstall in class AbstractSoftwareProcessDriverpublic void customize()
AbstractSoftwareProcessDrivercustomize in class AbstractSoftwareProcessDriverpublic boolean isCustomizationCompleted()
isCustomizationCompleted in interface NginxDriverpublic void launch()
AbstractSoftwareProcessDriverlaunch in class AbstractSoftwareProcessDriverpublic static java.lang.String sudoIfPrivilegedPort(int port,
java.lang.String command)
public static java.lang.String sudoBashCIfPrivilegedPort(int port,
java.lang.String command)
public boolean isRunning()
SoftwareProcessDriverisRunning in interface SoftwareProcessDriverpublic void stop()
SoftwareProcessDriverstop in interface SoftwareProcessDriverstop in class AbstractSoftwareProcessDriverStartable.stop()public void kill()
SoftwareProcessDriverkill in interface SoftwareProcessDriverkill in class AbstractSoftwareProcessDriverpublic void reload()