|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.lang.GroovyObjectSupport
brooklyn.entity.basic.AbstractEntity
brooklyn.entity.basic.SoftwareProcessImpl
public abstract class SoftwareProcessImpl extends AbstractEntity
An Entity representing a piece of software which can be installed, run, and controlled. A single such entity can only run on a single MachineLocation at a time (you can have multiple on the machine). It typically takes config keys for suggested versions, filesystem locations to use, and environment variables to set.
It exposes sensors for service state (Lifecycle) and status (String), and for host info, log file location.
Field Summary | |
---|---|
protected SensorRegistry |
sensorRegistry
|
Fields inherited from class AbstractEntity | |
---|---|
LOG, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED, _subscriptionTracker, attributesInternal, configsInternal, managementSupport, tempWorkings |
Constructor Summary | |
SoftwareProcessImpl()
|
|
SoftwareProcessImpl(Entity parent)
|
|
SoftwareProcessImpl(java.util.Map properties)
|
|
SoftwareProcessImpl(java.util.Map properties, Entity parent)
|
Method Summary | |
---|---|
protected void
|
callRebindHooks()
|
protected void
|
callStartHooks()
|
void
|
checkModifiable()
|
protected void
|
connectSensors()
For binding to the running app (e.g. connecting sensors to registry). |
protected void
|
connectServiceUpIsRunning()
For connecting the SERVICE_UP sensor to the value of the getDriver().isRunning() expression. |
protected void
|
disconnectSensors()
For disconneting from the running app. |
protected void
|
disconnectServiceUpIsRunning()
For disconneting the SERVICE_UP feed. |
protected SoftwareProcessDriver
|
doInitDriver(MachineLocation machine)
Creates the driver (if does not already exist or needs replaced for some reason). |
SoftwareProcessDriver
|
getDriver()
|
java.lang.String
|
getLocalHostname()
|
protected MachineLocation
|
getMachineOrNull()
|
protected java.util.Map
|
getProvisioningFlags(MachineProvisioningLocation location)
|
protected MachineProvisioningLocation
|
getProvisioningLocation()
|
protected java.util.Collection
|
getRequiredOpenPorts()
returns the ports that this entity wants to use; default implementation returns 22 plus first value for each PortAttributeSensorAndConfigKey config key PortRange. |
protected SoftwareProcessDriver
|
newDriver(MachineLocation loc)
|
protected java.util.Map
|
obtainProvisioningFlags(MachineProvisioningLocation location)
|
void
|
onManagementStarted()
|
void
|
onManagementStarting()
|
protected void
|
postDriverRestart()
|
protected void
|
postDriverStart()
Called after driver.start(). |
protected void
|
postRebind()
Called after this entity is fully rebound (i.e. it is fully managed). |
protected void
|
postRestart()
|
protected void
|
postStart()
Called after the rest of start has completed. |
protected void
|
preStart()
Called before driver.start; guarantees the driver will exist, locations will have been set and sensorRegistry will be set (but not yet activated). |
protected void
|
preStop()
|
protected void
|
rebind()
|
void
|
restart()
|
protected void
|
setProvisioningLocation(MachineProvisioningLocation val)
|
void
|
start(java.util.Collection locations)
|
protected void
|
startInLocation(java.util.Collection locations)
|
protected void
|
startInLocation(Location location)
|
protected void
|
startInLocation(MachineProvisioningLocation location)
|
protected void
|
startInLocation(MachineLocation machine)
|
void
|
stop()
|
void
|
stopInLocation(MachineLocation machine)
|
void
|
waitForEntityStart()
|
void
|
waitForServiceUp()
|
void
|
waitForServiceUp(groovy.time.TimeDuration duration)
|
void
|
waitForServiceUp(long duration, java.util.concurrent.TimeUnit units)
|
Methods inherited from class groovy.lang.GroovyObjectSupport | |
---|---|
groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll() |
Field Detail |
---|
protected SensorRegistry sensorRegistry
Constructor Detail |
---|
public SoftwareProcessImpl()
public SoftwareProcessImpl(Entity parent)
public SoftwareProcessImpl(java.util.Map properties)
public SoftwareProcessImpl(java.util.Map properties, Entity parent)
Method Detail |
---|
protected void callRebindHooks()
protected void callStartHooks()
public void checkModifiable()
protected void connectSensors()
protected void connectServiceUpIsRunning()
Should be called inside connectSensors().
protected void disconnectSensors()
protected void disconnectServiceUpIsRunning()
Should be called from disconnectSensors().
protected SoftwareProcessDriver doInitDriver(MachineLocation machine)
public SoftwareProcessDriver getDriver()
public java.lang.String getLocalHostname()
protected MachineLocation getMachineOrNull()
protected java.util.Map getProvisioningFlags(MachineProvisioningLocation location)
protected MachineProvisioningLocation getProvisioningLocation()
protected java.util.Collection getRequiredOpenPorts()
protected SoftwareProcessDriver newDriver(MachineLocation loc)
protected java.util.Map obtainProvisioningFlags(MachineProvisioningLocation location)
@Override public void onManagementStarted()
@Override public void onManagementStarting()
protected void postDriverRestart()
protected void postDriverStart()
protected void postRebind()
protected void postRestart()
protected void postStart()
protected void preStart()
protected void preStop()
protected void rebind()
public void restart()
protected void setProvisioningLocation(MachineProvisioningLocation val)
@Override public public void start(java.util.Collection locations)
protected void startInLocation(java.util.Collection locations)
protected void startInLocation(Location location)
protected void startInLocation(MachineProvisioningLocation location)
protected void startInLocation(MachineLocation machine)
public void stop()
public void stopInLocation(MachineLocation machine)
public void waitForEntityStart()
public void waitForServiceUp()
public void waitForServiceUp(groovy.time.TimeDuration duration)
public void waitForServiceUp(long duration, java.util.concurrent.TimeUnit units)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.