Brooklyn

brooklyn.entity.basic
[Groovy] Class SoftwareProcessEntity

java.lang.Object
  groovy.lang.GroovyObjectSupport
      brooklyn.entity.basic.AbstractEntity
          brooklyn.entity.basic.SoftwareProcessEntity
All Implemented Interfaces:
DriverDependentEntity, Startable

abstract class SoftwareProcessEntity
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
static AttributeSensor ADDRESS

static ConfigKey CUSTOMIZE_LATCH

static AttributeSensor HOSTNAME

static ConfigKey INSTALL_LATCH

static ConfigKey LAUNCH_LATCH

static BasicConfigKey PROVISIONING_PROPERTIES

static BasicAttributeSensor SERVICE_STATE

static BasicConfigKey SHELL_ENVIRONMENT

static ConfigKey START_LATCH

static ConfigKey SUGGESTED_INSTALL_DIR

static ConfigKey SUGGESTED_RUN_DIR

static ConfigKey SUGGESTED_VERSION

protected SensorRegistry sensorRegistry

 
Fields inherited from class AbstractEntity
LOG, SENSOR_ADDED, SENSOR_REMOVED, _subscriptionTracker, application, attributesInternal, configsInternal, execution, managementContext, managementData, subscription, tempWorkings
 
Constructor Summary
SoftwareProcessEntity(java.util.Map properties = [:], Entity owner = null)

SoftwareProcessEntity(Entity owner)

 
Method Summary
protected void checkAllSensorsConnected()

void checkModifiable()

protected void connectSensors()

lifecycle message for connecting sensors to registry; typically overridden by subclasses

SoftwareProcessDriver getDriver()

java.lang.String getLocalHostname()

protected java.util.Map getProvisioningFlags(MachineProvisioningLocation location)

deprecated:
in 0.4.0. use obtainPF.

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 void initDriver(SshMachineLocation machine)

protected SoftwareProcessDriver newDriver(SshMachineLocation loc)

protected java.util.Map obtainProvisioningFlags(MachineProvisioningLocation location)

protected void postActivation()

protected void postStart()

protected void preStart()

protected void preStop()

Location removeFirstMatchingLocation(groovy.lang.Closure matcher)

Location removeFirstMatchingLocation(Predicate matcher)

void restart()

protected void setProvisioningLocation(MachineProvisioningLocation val)

void start(java.util.Collection locations)

void startInLocation(java.util.Collection locations)

void startInLocation(MachineProvisioningLocation location)

void startInLocation(SshMachineLocation machine)

void stop()

void stopInLocation(MachineLocation machine)

void waitForEntityStart()

void waitForServiceUp()

void waitForServiceUp(groovy.time.TimeDuration duration)

 
Methods inherited from class AbstractEntity
addEnricher, addGroup, addOwnedChild, addPolicy, assertNotYetOwned, clearOwner, configure, configure, destroy, emit, emitInternal, firstLocation, getAllConfig, getApplication, getApplicationId, getAttribute, getAttributeByNameParts, getConfig, getConfig, getConfig, getConfig, getConfigMap, getEffector, getEnrichers, getEntityType, getExecutionContext, getGroups, getLocations, getManagementContext, getMutableEntityType, getOwnedChildren, getOwner, getPolicies, getSubscriptionContext, getSubscriptionTracker, hasEverBeenManaged, invalidate, invoke, invoke, invokeFromJava, invokeMethod, onManagementBecomingMaster, onManagementNoLongerMaster, refreshInheritedConfig, refreshInheritedConfigOfChildren, removeAllEnrichers, removeAllPolicies, removeAttribute, removeEnricher, removeOwnedChild, removePolicy, setApplication, setAttribute, setAttribute, setBeingManaged, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setConfigIfValNonNull, setConfigIfValNonNull, setOwner, subscribe, subscribeToChildren, subscribeToMembers, toString, toStringFieldsToInclude, unsubscribe, unsubscribe
 
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

ADDRESS

public static final AttributeSensor ADDRESS


CUSTOMIZE_LATCH

@SetFromFlag("customizeLatch")
public static final ConfigKey CUSTOMIZE_LATCH


HOSTNAME

public static final AttributeSensor HOSTNAME


INSTALL_LATCH

@SetFromFlag("installLatch")
public static final ConfigKey INSTALL_LATCH


LAUNCH_LATCH

@SetFromFlag("launchLatch")
public static final ConfigKey LAUNCH_LATCH


PROVISIONING_PROPERTIES

@SetFromFlag("provisioningProperties")
public static final BasicConfigKey PROVISIONING_PROPERTIES


SERVICE_STATE

public static final BasicAttributeSensor SERVICE_STATE


SHELL_ENVIRONMENT

@SetFromFlag("env")
public static final BasicConfigKey SHELL_ENVIRONMENT


START_LATCH

@SetFromFlag("startLatch")
public static final ConfigKey START_LATCH


SUGGESTED_INSTALL_DIR

@SetFromFlag("installDir")
public static final ConfigKey SUGGESTED_INSTALL_DIR


SUGGESTED_RUN_DIR

@SetFromFlag("runDir")
public static final ConfigKey SUGGESTED_RUN_DIR


SUGGESTED_VERSION

@SetFromFlag("version")
public static final ConfigKey SUGGESTED_VERSION


sensorRegistry

protected SensorRegistry sensorRegistry


 
Constructor Detail

SoftwareProcessEntity

SoftwareProcessEntity(java.util.Map properties = [:], Entity owner = null)


SoftwareProcessEntity

SoftwareProcessEntity(Entity owner)


 
Method Detail

checkAllSensorsConnected

protected void checkAllSensorsConnected()


checkModifiable

void checkModifiable()


connectSensors

protected void connectSensors()
lifecycle message for connecting sensors to registry; typically overridden by subclasses


getDriver

SoftwareProcessDriver getDriver()


getLocalHostname

java.lang.String getLocalHostname()


getProvisioningFlags

protected java.util.Map getProvisioningFlags(MachineProvisioningLocation location)
deprecated:
in 0.4.0. use obtainPF. introduced in a branch which duplicates changes in master where it is called "obtainPF". will remove as soon as those uses are updated.


getProvisioningLocation

protected MachineProvisioningLocation getProvisioningLocation()


getRequiredOpenPorts

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.


initDriver

protected void initDriver(SshMachineLocation machine)


newDriver

protected SoftwareProcessDriver newDriver(SshMachineLocation loc)


obtainProvisioningFlags

protected java.util.Map obtainProvisioningFlags(MachineProvisioningLocation location)


postActivation

protected void postActivation()


postStart

protected void postStart()


preStart

protected void preStart()


preStop

protected void preStop()


removeFirstMatchingLocation

Location removeFirstMatchingLocation(groovy.lang.Closure matcher)


removeFirstMatchingLocation

Location removeFirstMatchingLocation(Predicate matcher)


restart

void restart()


setProvisioningLocation

protected void setProvisioningLocation(MachineProvisioningLocation val)


start

@Override
void start(java.util.Collection locations)


startInLocation

void startInLocation(java.util.Collection locations)


startInLocation

void startInLocation(MachineProvisioningLocation location)


startInLocation

void startInLocation(SshMachineLocation machine)


stop

void stop()


stopInLocation

void stopInLocation(MachineLocation machine)


waitForEntityStart

void waitForEntityStart()


waitForServiceUp

void waitForServiceUp()


waitForServiceUp

void waitForServiceUp(groovy.time.TimeDuration duration)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.