public class NginxControllerImpl extends AbstractControllerImpl implements NginxController, NginxController.NginxControllerInternal
NginxController
entity.Modifier and Type | Class and Description |
---|---|
static class |
NginxControllerImpl.UrlMappingsMemberTrackerPolicy |
AbstractControllerImpl.ServerPoolMemberTrackerPolicy
NginxController.NginxControllerInternal
SoftwareProcess.ChildStartableMode, SoftwareProcess.RestartSoftwareParameters, SoftwareProcess.StopSoftwareParameters
BrooklynObject.TagSupport
Configurable.ConfigurationSupport
Startable.RestartEffectorBody, Startable.StartEffectorBody, Startable.StopEffectorBody
EntityInternal.FeedSupport
BrooklynObjectInternal.ConfigurationSupportInternal
CHILD_ADDED, CHILD_REMOVED, EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, LOCATION_ADDED, LOCATION_REMOVED, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED
ACCESS_LOG_LOCATION, DEPLOY, DOWNLOAD_ADDON_URLS, DOWNLOAD_URL, ERROR_LOG_LOCATION, GET_CURRENT_CONFIGURATION, HTTP_POLL_PERIOD, NGINX_URL_ANSWERS_NICELY, PCRE_VERSION, PID_FILE, SERVER_CONF_GENERATOR, SERVER_CONF_TEMPLATE_URL, STATIC_CONTENT_ARCHIVE_URL, STICKY, STICKY_VERSION, SUGGESTED_VERSION, WITH_CC_OPT, WITH_LD_OPT
DOMAIN_NAME, SERVICE_UP_URL_PATH, SSL_CONFIG
ADDRESS, CHILDREN_STARTABLE_MODE, CUSTOMIZE_LATCH, ENTITY_STARTED, EXPANDED_INSTALL_DIR, HOSTNAME, INSTALL_DIR, INSTALL_FILES, INSTALL_LATCH, INSTALL_RESOURCES_LATCH, INSTALL_TEMPLATES, INSTALL_UNIQUE_LABEL, LAUNCH_LATCH, MAXIMUM_REBIND_SENSOR_CONNECT_DELAY, POST_INSTALL_COMMAND, POST_LAUNCH_COMMAND, PRE_INSTALL_COMMAND, PRE_INSTALL_FILES, PRE_INSTALL_TEMPLATES, PRE_LAUNCH_COMMAND, PROVISIONING_LOCATION, PROVISIONING_PROPERTIES, REQUIRED_OPEN_LOGIN_PORTS, RUN_DIR, RUNTIME_FILES, RUNTIME_RESOURCES_LATCH, RUNTIME_TEMPLATES, SERVICE_PROCESS_IS_RUNNING, SERVICE_STATE_ACTUAL, SERVICE_STATE_EXPECTED, SETUP_LATCH, SHELL_ENVIRONMENT, SKIP_ENTITY_START_IF_RUNNING, SKIP_INSTALLATION, START_LATCH, START_TIMEOUT, SUBNET_ADDRESS, SUBNET_HOSTNAME, SUGGESTED_INSTALL_DIR, SUGGESTED_RUN_DIR
HOST_AND_PORT_SENSOR, HOSTNAME, HOSTNAME_SENSOR, MAIN_URI, PORT_NUMBER_SENSOR, PROTOCOL, PROXY_HTTP_PORT, PROXY_HTTPS_PORT, RELOAD, ROOT_URL, SERVER_POOL, SERVER_POOL_TARGETS, UPDATE, URL_MAPPINGS
RESTART, SERVICE_UP, START, STOP
Constructor and Description |
---|
NginxControllerImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
appendSslConfig(java.lang.String id,
java.lang.StringBuilder out,
java.lang.String prefix,
ProxySslConfig ssl,
boolean sslBlock,
boolean certificateBlock) |
void |
connectSensors()
For binding to the running app (e.g.
|
void |
deploy(java.lang.String archiveUrl) |
void |
doExtraConfigurationDuringStart() |
java.lang.String |
getConfigFile() |
java.lang.String |
getCurrentConfiguration() |
NginxDriver |
getDriver() |
java.lang.Class<?> |
getDriverInterface() |
java.lang.String |
getShortName()
gets a short name, for human-friendly identification e.g.
|
java.lang.Iterable<UrlMapping> |
getUrlMappings() |
void |
installSslKeys(java.lang.String id,
ProxySslConfig ssl)
Installs SSL keys named as
id.crt and id.key where nginx can find them. |
boolean |
isSticky() |
void |
reconfigureService()
Implementations should update the configuration so that 'serverPoolAddresses' are targeted.
|
void |
reload() |
bind, getDomain, getHostAndPortSensor, getHostnameSensor, getPort, getPortNumberSensor, getProtocol, getServerPoolAddresses, getSslConfig, getUrl, init, isActive, isSsl, onManagementNoLongerMaster, update, updateAsync, updateNeeded
checkModifiable, getLocalHostname, onManagementStarted, onManagementStarting, rebind, restart, start, stop, waitForEntityStart, waitForServiceUp, waitForServiceUp, waitForServiceUp, waitForServiceUp
addChild, addChild, addEnricher, addEnricher, addFeed, addGroup, addLocations, addPolicy, addPolicy, addTag, clearLocations, clearParent, config, configure, configure, configure, configure, configure, containsTag, destroy, emit, emitInternal, equals, feeds, firstLocation, getAllAttributes, getAllConfig, getAllConfigBag, getApplication, getApplicationId, getAttribute, getAttributeByNameParts, getChildren, getConfig, getConfig, getConfig, getConfig, getConfigMap, getConfigRaw, getConfigRaw, getCreationTime, getDisplayName, getEffector, getEnrichers, getEntityType, getExecutionContext, getFeedSupport, getGroups, getIconUrl, getLocalConfigBag, getLocations, getManagementContext, getManagementSupport, getMutableEntityType, getParent, getPolicies, getProxy, getProxyIfAvailable, getRebindSupport, getSubscriptionContext, getTags, hashCode, invalidateReferences, invoke, invoke, invoke, modifyAttribute, onManagementBecomingMaster, onManagementStopped, refreshInheritedConfig, removeAllEnrichers, removeAllPolicies, removeAttribute, removeChild, removeEnricher, removeGroup, removeLocations, removePolicy, removeTag, requestPersist, resetProxy, setAttribute, setAttribute, setAttributeWithoutPublishing, setConfig, setConfig, setConfig, setConfig, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setDisplayName, setManagementContext, setParent, setProxy, subscribe, subscribeToChildren, subscribeToMembers, toMetadataRecord, toString, unsubscribe, unsubscribe
getCatalogItemId, getId, getTagSupport, setCatalogItemId, tags
getDomain, getHostAndPortSensor, getHostnameSensor, getPort, getPortNumberSensor, getProtocol, getServerPoolAddresses, getSslConfig, getUrl, isActive, isSsl
bind, update
addChild, addChild, addEnricher, addEnricher, addFeed, addGroup, addPolicy, addPolicy, addTag, clearParent, containsTag, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getConfig, getConfigRaw, getConfigRaw, getCreationTime, getDisplayName, getEnrichers, getEntityType, getGroups, getIconUrl, getId, getLocations, getParent, getPolicies, getTags, invoke, removeChild, removeEnricher, removeGroup, removePolicy, removeTag, setParent
getCatalogItemId, getTagSupport, tags
config, setConfig
setCatalogItemId
public void reload()
reload
in interface LoadBalancer
reload
in class AbstractControllerImpl
public boolean isSticky()
isSticky
in interface NginxController
public void connectSensors()
SoftwareProcessImpl
Implementations should be idempotent (ie tell whether sensors already connected), though the framework is pretty good about not calling when already connected. TODO improve the framework's feed system to detect duplicate additions
public java.lang.Class<?> getDriverInterface()
getDriverInterface
in interface DriverDependentEntity
public NginxDriver getDriver()
getDriver
in interface DriverDependentEntity
getDriver
in class SoftwareProcessImpl
public void doExtraConfigurationDuringStart()
doExtraConfigurationDuringStart
in interface NginxController.NginxControllerInternal
public java.lang.String getCurrentConfiguration()
getCurrentConfiguration
in interface NginxController
public void deploy(java.lang.String archiveUrl)
deploy
in interface NginxController
public void reconfigureService()
AbstractControllerImpl
public void installSslKeys(java.lang.String id, ProxySslConfig ssl)
id.crt
and id.key
where nginx can find them.
Currently skips re-installs (does not support changing)
public java.lang.String getConfigFile()
getConfigFile
in interface NginxController
public java.lang.Iterable<UrlMapping> getUrlMappings()
getUrlMappings
in interface NginxController
public java.lang.String getShortName()
HasShortName
getShortName
in interface HasShortName
public boolean appendSslConfig(java.lang.String id, java.lang.StringBuilder out, java.lang.String prefix, ProxySslConfig ssl, boolean sslBlock, boolean certificateBlock)
appendSslConfig
in interface NginxController