|
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
Field Summary | |
---|---|
protected static Logger |
LOG
|
Constructor Summary | |
EntityDynamicType(AbstractEntity entity)
|
|
protected EntityDynamicType(java.lang.Class clazz)
|
Method Summary | |
---|---|
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, java.util.Map configKeyFields)
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)
ConfigKeys available on this entity. |
java.lang.reflect.Field
|
getConfigKeyField(java.lang.String keyName)
field where a config key is defined, for use getting annotations. note annotations are not inherited. |
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. |
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() |
Field Detail |
---|
protected static final Logger LOG
Constructor Detail |
---|
public EntityDynamicType(AbstractEntity entity)
protected EntityDynamicType(java.lang.Class clazz)
Method Detail |
---|
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, java.util.Map configKeyFields)
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 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.