|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
brooklyn.entity.rebind.Rebindablebrooklyn.entity.Entity
brooklyn.entity.basic.EntityLocal
brooklyn.entity.trait.Identifiable
brooklyn.entity.trait.Configurable
public interface EntityLocal extends Configurable, Entity
Extended Entity interface for use in places where the caller should have certain privileges, such as setting attribute values, adding policies, etc. FIXME Moved from core project to api project because of bug in groovy's covariant return types. EntityDriver needs to return EntityLocal rather than Entity, to avoid changing a whole load of sub-types. FIXME Add setAttribute(AttributeSensorAndConfigKey, T>) back in if/when move it back, or if we extract an interface for AttributeSensorAndConfigKey.
Method Summary | |
---|---|
void
|
emit(Sensor sensor, java.lang.Object value)
@see SubscriptionManager#subscribeToChildren(Map, Entity, Sensor, SensorEventListener) |
java.lang.Object
|
getConfig(ConfigKey key, java.lang.Object defaultValue)
sets the value of the given attribute sensor from the config key value herein, // * if the config key resolves to a non-null value as a sensor // * // * @deprecated since 0.5; use setAttribute(AttributeSensor, Object), such as // * // * T val = getConfig(KEY.getConfigKey()); // * if (val ! |
java.lang.Object
|
getConfig(HasConfigKey key)
|
java.lang.Object
|
getConfig(HasConfigKey key, java.lang.Object defaultValue)
|
ExecutionContext
|
getExecutionContext()
|
ManagementContext
|
getManagementContext()
|
boolean
|
removeAllEnrichers()
|
boolean
|
removeAllPolicies()
@return The task execution context for the entity, or null if it is not yet managed. |
java.lang.Object
|
setAttribute(AttributeSensor sensor, java.lang.Object val)
Sets the Sensor data for the given attribute to the specified value. |
java.lang.Object
|
setConfig(ConfigKey key, java.lang.Object val)
Must be called before the entity is managed. |
java.lang.Object
|
setConfig(ConfigKey key, Task val)
|
java.lang.Object
|
setConfig(HasConfigKey key, java.lang.Object val)
|
java.lang.Object
|
setConfig(HasConfigKey key, Task val)
|
void
|
setDisplayName(java.lang.String displayName)
Sets the entity's display name. |
SubscriptionHandle
|
subscribe(Entity producer, Sensor sensor, SensorEventListener listener)
@see SubscriptionManager#subscribeToMembers(Group, Sensor, SensorEventListener) |
SubscriptionHandle
|
subscribeToChildren(Entity parent, Sensor sensor, SensorEventListener listener)
|
SubscriptionHandle
|
subscribeToMembers(Group group, Sensor sensor, SensorEventListener listener)
|
boolean
|
unsubscribe(Entity producer)
Removes all policy from this entity. |
boolean
|
unsubscribe(Entity producer, SubscriptionHandle handle)
|
Methods inherited from interface Entity | |
---|---|
addChild, addChild, addEnricher, addGroup, addPolicy, clearParent, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getConfig, getCreationTime, getDisplayName, getEnrichers, getEntityType, getGroups, getIconUrl, getId, getLocations, getParent, getPolicies, getRebindSupport, invoke, removeChild, removeEnricher, removePolicy, setParent |
Methods inherited from interface Configurable | |
---|---|
setConfig |
Method Detail |
---|
public void emit(Sensor sensor, java.lang.Object value)
public java.lang.Object getConfig(ConfigKey key, java.lang.Object defaultValue)
// * T val = getConfig(KEY.getConfigKey()); // * if (val != null) { // * setAttribute(KEY, val) // * } // *// * // *
public java.lang.Object getConfig(HasConfigKey key)
public java.lang.Object getConfig(HasConfigKey key, java.lang.Object defaultValue)
public ExecutionContext getExecutionContext()
public ManagementContext getManagementContext()
public boolean removeAllEnrichers()
public boolean removeAllPolicies()
public java.lang.Object setAttribute(AttributeSensor sensor, java.lang.Object val)
public java.lang.Object setConfig(ConfigKey key, java.lang.Object val)
public java.lang.Object setConfig(ConfigKey key, Task val)
public java.lang.Object setConfig(HasConfigKey key, java.lang.Object val)
public java.lang.Object setConfig(HasConfigKey key, Task val)
public void setDisplayName(java.lang.String displayName)
*/ public SubscriptionHandle subscribe(Entity producer, Sensor sensor, SensorEventListener listener)
* public SubscriptionHandle subscribeToChildren(Entity parent, Sensor sensor, SensorEventListener listener)
/** public SubscriptionHandle subscribeToMembers(Group group, Sensor sensor, SensorEventListener listener)
* Use with caution as some entities automatically register enrichers; this will remove those enrichers as well. public boolean unsubscribe(Entity producer)
*/ public boolean unsubscribe(Entity producer, SubscriptionHandle handle)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.