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, setup
copyResource, 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, 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 EntityDriver
getEntity
in interface SoftwareProcessDriver
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 install()
AbstractSoftwareProcessDriver
install
in class AbstractSoftwareProcessDriver
public void customize()
AbstractSoftwareProcessDriver
customize
in class AbstractSoftwareProcessDriver
public boolean isCustomizationCompleted()
isCustomizationCompleted
in interface NginxDriver
public void launch()
AbstractSoftwareProcessDriver
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()