|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.entity.basic.EntityDynamicType
public class EntityDynamicType
This is the actual type of an entity instance at runtime, which can change from the static EntityType, and can change over time; for this reason it does *not* implement EntityType, but callers can call getSnapshot() to get a snapshot such instance
Constructor Summary | |
EntityDynamicType(AbstractEntity entity)
|
|
protected EntityDynamicType(java.lang.Class clazz)
|
Method Summary | |
---|---|
void
|
addEffector(Effector newEffector)
Adds the given Effector to this entity. |
void
|
addEffector(Effector effector, EffectorTaskFactory body)
Adds an effector with an explicit body |
void
|
addEffector(Effector effector, EffectorBody body)
Adds an effector with an explicit body |
void
|
addSensor(Sensor newSensor)
Adds the given Sensor to this entity. |
void
|
addSensorIfAbsent(Sensor newSensor)
|
Sensor
|
addSensorIfAbsentWithoutPublishing(Sensor newSensor)
|
void
|
addSensors(java.lang.Iterable newSensors)
Adds the given Sensors to this entity. |
protected static void
|
buildConfigKeys(java.lang.Class clazz, AbstractEntity optionalEntity, java.util.Map configKeys)
Finds the config keys defined on the entity's class, statics and optionally any non-static (discouraged). |
protected static java.util.Map
|
findEffectors(java.lang.Class clazz, Entity optionalEntity)
Finds the effectors defined on the entity's class, statics and optionally any non-static (discouraged). |
protected static java.util.Map
|
findSensors(java.lang.Class clazz, Entity optionalEntity)
Finds the sensors defined on the entity's class, statics and optionally any non-static (discouraged). |
ConfigKey
|
getConfigKey(java.lang.String keyName)
field where a config key is defined, for use getting annotations. note annotations are not inherited. |
java.lang.reflect.Field
|
getConfigKeyField(java.lang.String keyName)
|
java.util.Map
|
getConfigKeys()
ConfigKeys available on this entity. |
Effector
|
getEffector(java.lang.String name)
@return the effector with the given name, or null if not found |
java.util.Map
|
getEffectors()
Effectors available on this entity. |
java.lang.Class
|
getEntityClass()
|
Sensor
|
getSensor(java.lang.String sensorName)
Convenience for finding named sensor. |
java.util.Map
|
getSensors()
Sensors available on this entity. |
EntityType
|
getSnapshot()
|
Sensor
|
removeSensor(java.lang.String sensorName)
Removes the named Sensor from this entity. |
boolean
|
removeSensor(Sensor sensor)
Removes the named Sensor from this entity. |
void
|
setName(java.lang.String name)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constructor Detail |
---|
public EntityDynamicType(AbstractEntity entity)
protected EntityDynamicType(java.lang.Class clazz)
Method Detail |
---|
Effector> oldEffector = effectors.put(newEffector.getName(), newEffector); public void addEffector(Effector newEffector)
addEffector(new EffectorAndBody(effector, body)); public void addEffector(Effector effector, EffectorTaskFactory body)
addEffector(effector, new EffectorBodyTaskFactory(body)); public void addEffector(Effector effector, EffectorBody body)
public void addSensor(Sensor newSensor)
public void addSensorIfAbsent(Sensor newSensor)
public Sensor addSensorIfAbsentWithoutPublishing(Sensor newSensor)
public void addSensors(java.lang.Iterable newSensors)
protected static void buildConfigKeys(java.lang.Class clazz, AbstractEntity optionalEntity, java.util.Map configKeys)
protected static java.util.Map findEffectors(java.lang.Class clazz, Entity optionalEntity)
protected static java.util.Map findSensors(java.lang.Class clazz, Entity optionalEntity)
public ConfigKey getConfigKey(java.lang.String keyName)
public java.lang.reflect.Field getConfigKeyField(java.lang.String keyName)
public java.util.Map getConfigKeys()
public Effector getEffector(java.lang.String name)
public java.util.Map getEffectors()
public java.lang.Class getEntityClass()
public Sensor getSensor(java.lang.String sensorName)
public java.util.Map getSensors()
public EntityType getSnapshot()
public Sensor removeSensor(java.lang.String sensorName)
public boolean removeSensor(Sensor sensor)
public void setName(java.lang.String name)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.