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() |
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() |
boolean |
isCustomizationCompleted() |
boolean |
isRunning()
Whether the entity components have started.
|
void |
kill()
Kills the process, ungracefully and immediately where possible (e.g.
|
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 pre-install 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, copyInstallResources, copyResource, copyResource, execute, execute, execute, getAddress, getExpandedInstallDir, getHostname, getInstallDir, getLocation, getMachine, getPortsUsed, getRunDir, getShellEnvironment, getSubnetAddress, getSubnetHostname, runPostInstallCommand, runPostLaunchCommand, runPreInstallCommand, runPreLaunchCommand, setExpandedInstallDir, setup
copyPreInstallResources, copyResource, copyResource, copyResource, copyResource, copyResource, copyResource, copyResource, copyRuntimeResources, copyTemplate, copyTemplate, copyTemplate, getResource, getResourceAsString, getVersion, processTemplate, processTemplate, processTemplate, processTemplate, processTemplateContents, processTemplateContents, restart, start
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRunDir
restart, start
getLocation
public static final org.slf4j.Logger log
public static final java.lang.String NGINX_PID_FILE
public NginxSshDriver(NginxControllerImpl entity, SshMachineLocation machine)
public NginxControllerImpl getEntity()
SoftwareProcessDriver
getEntity
in interface SoftwareProcessDriver
getEntity
in interface EntityDriver
getEntity
in class AbstractSoftwareProcessDriver
public java.lang.String getLogFileLocation()
public java.lang.String getAccessLogLocation()
public java.lang.String getErrorLogLocation()
public java.lang.String getPidFile()
logs/nginx.pid
getPidFile
in interface NginxDriver
@Deprecated public java.lang.Integer getHttpPort()
public java.lang.Integer getPort()
public void rebind()
SoftwareProcessDriver
rebind
in interface SoftwareProcessDriver
rebind
in class AbstractSoftwareProcessDriver
public void postLaunch()
AbstractSoftwareProcessDriver
postLaunch
in class AbstractSoftwareProcessDriver
public void preInstall()
AbstractSoftwareProcessDriver
preInstall
in class AbstractSoftwareProcessDriver
public void install()
install
in class AbstractSoftwareProcessDriver
public void customize()
customize
in class AbstractSoftwareProcessDriver
public boolean isCustomizationCompleted()
isCustomizationCompleted
in interface NginxDriver
public void launch()
launch
in class AbstractSoftwareProcessDriver
public 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()
SoftwareProcessDriver
isRunning
in interface SoftwareProcessDriver
public void stop()
SoftwareProcessDriver
stop
in interface SoftwareProcessDriver
stop
in class AbstractSoftwareProcessDriver
Startable.stop()
public void kill()
SoftwareProcessDriver
kill
in interface SoftwareProcessDriver
kill
in class AbstractSoftwareProcessDriver
public void reload()