|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
brooklyn.entity.basic.EntityLocalbrooklyn.entity.Entity
public interface EntityLocal extends Entity
Extended Entity interface for use in places where the caller should have certain privileges, such as setting attribute values, adding policies, etc.
Method Summary | |
---|---|
void
|
addEnricher(AbstractEnricher enricher)
Adds the given enricher to this entity. |
void
|
addPolicy(AbstractPolicy policy)
Adds the given policy to this entity. |
void
|
emit(Sensor sensor, java.lang.Object value)
Emits a SensorEvent event on behalf of this entity (as though produced by this entity). |
java.lang.Object
|
getConfig(ConfigKey key, java.lang.Object defaultValue)
|
java.lang.Object
|
getConfig(HasConfigKey key)
|
java.lang.Object
|
getConfig(HasConfigKey key, java.lang.Object defaultValue)
|
ExecutionContext
|
getExecutionContext()
@return The task execution context for the entity, or null if it is not yet managed. |
ManagementContext
|
getManagementContext()
@return The management context for the entity, or null if it is not yet managed. |
boolean
|
removeAllEnrichers()
Removes all enricher from this entity. |
boolean
|
removeAllPolicies()
Removes all policy from this entity. |
boolean
|
removeEnricher(AbstractEnricher enricher)
Removes the given enricher from this entity. |
boolean
|
removePolicy(AbstractPolicy policy)
Removes the given policy from this entity. |
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 started. |
java.lang.Object
|
setConfig(HasConfigKey key, java.lang.Object val)
|
SubscriptionHandle
|
subscribe(Entity producer, Sensor sensor, SensorEventListener listener)
Allow us to subscribe to data from a Sensor on another entity. |
SubscriptionHandle
|
subscribeToChildren(Entity parent, Sensor sensor, SensorEventListener listener)
@see SubscriptionManager#subscribeToChildren(Map, Entity, Sensor, SensorEventListener) |
Methods inherited from interface Entity | |
---|---|
addGroup, addOwnedChild, clearOwner, getApplication, getApplicationId, getAttribute, getConfig, getDisplayName, getEnrichers, getEntityType, getGroups, getId, getLocations, getOwnedChildren, getOwner, getPolicies, invoke, removeOwnedChild, setOwner |
Method Detail |
---|
public void addEnricher(AbstractEnricher enricher)
public void addPolicy(AbstractPolicy policy)
public void emit(Sensor sensor, java.lang.Object value)
Note that for attribute sensors it is nearly always recommended to use setAttribute, as this method will not update local values.
public java.lang.Object getConfig(ConfigKey key, java.lang.Object defaultValue)
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 boolean removeEnricher(AbstractEnricher enricher)
public boolean removePolicy(AbstractPolicy policy)
public java.lang.Object setAttribute(AttributeSensor sensor, java.lang.Object val)
null
)
public java.lang.Object setConfig(ConfigKey key, java.lang.Object val)
public java.lang.Object setConfig(HasConfigKey key, java.lang.Object val)
public SubscriptionHandle subscribe(Entity producer, Sensor sensor, SensorEventListener listener)
public SubscriptionHandle subscribeToChildren(Entity parent, Sensor sensor, SensorEventListener listener)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.