|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface EntityLocal
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 | ||
|---|---|---|
|
emit(Sensor<T> sensor,
T value)
Emits a SensorEvent event on behalf of this entity (as though produced by this entity). |
|
|
getConfig(brooklyn.config.ConfigKey.HasConfigKey<T> key)
|
|
|
getConfig(brooklyn.config.ConfigKey.HasConfigKey<T> key,
T defaultValue)
Deprecated. in 0.5; use #getConfig(HasConfigKey) |
|
|
getConfig(brooklyn.config.ConfigKey<T> key,
T defaultValue)
Deprecated. in 0.5; use Entity.getConfig(ConfigKey) |
|
ExecutionContext |
getExecutionContext()
Deprecated. since 0.5.0; access via EntityInternal#getExecutionContext(). |
|
ManagementContext |
getManagementContext()
Deprecated. since 0.5.0; access via EntityInternal#getManagementContext(). |
|
boolean |
removeAllEnrichers()
Removes all enricher from this entity. |
|
boolean |
removeAllPolicies()
Removes all policy from this entity. |
|
|
setAttribute(AttributeSensor<T> sensor,
T val)
Sets the Sensor data for the given attribute to the specified value. |
|
|
setConfig(brooklyn.config.ConfigKey.HasConfigKey<T> key,
T val)
|
|
|
setConfig(brooklyn.config.ConfigKey.HasConfigKey<T> key,
Task<T> val)
|
|
|
setConfig(brooklyn.config.ConfigKey<T> key,
T val)
Must be called before the entity is managed. |
|
|
setConfig(brooklyn.config.ConfigKey<T> key,
Task<T> val)
|
|
void |
setDisplayName(String displayName)
Sets the entity's display name. |
|
|
subscribe(Entity producer,
Sensor<T> sensor,
SensorEventListener<? super T> listener)
Allow us to subscribe to data from a Sensor on another entity. |
|
|
subscribeToChildren(Entity parent,
Sensor<T> sensor,
SensorEventListener<? super T> listener)
|
|
|
subscribeToMembers(Group group,
Sensor<T> sensor,
SensorEventListener<? super T> listener)
|
|
boolean |
unsubscribe(Entity producer)
Unsubscribes from the given producer. |
|
boolean |
unsubscribe(Entity producer,
SubscriptionHandle handle)
Unsubscribes the given handle. |
|
| Methods inherited from interface brooklyn.entity.Entity |
|---|
addChild, addChild, addEnricher, addGroup, addPolicy, clearParent, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getCreationTime, getDisplayName, getEnrichers, getEntityType, getGroups, getIconUrl, getId, getLocations, getParent, getPolicies, getRebindSupport, invoke, removeChild, removeEnricher, removePolicy, setParent |
| Method Detail |
|---|
void setDisplayName(String displayName)
<T> T setConfig(brooklyn.config.ConfigKey<T> key,
T val)
setConfig in interface Configurable
<T> T setConfig(brooklyn.config.ConfigKey<T> key,
Task<T> val)
<T> T setConfig(brooklyn.config.ConfigKey.HasConfigKey<T> key,
T val)
<T> T setConfig(brooklyn.config.ConfigKey.HasConfigKey<T> key,
Task<T> val)
<T> T setAttribute(AttributeSensor<T> sensor,
T val)
Sensor data for the given attribute to the specified value.
This can be used to "enrich" the entity, such as adding aggregated information,
rolling averages, etc.
null)
<T> T getConfig(brooklyn.config.ConfigKey<T> key,
T defaultValue)
Entity.getConfig(ConfigKey)
<T> T getConfig(brooklyn.config.ConfigKey.HasConfigKey<T> key)
getConfig in interface Entity
<T> T getConfig(brooklyn.config.ConfigKey.HasConfigKey<T> key,
T defaultValue)
#getConfig(HasConfigKey)
<T> void emit(Sensor<T> sensor,
T value)
SensorEvent event on behalf of this entity (as though produced by this entity).
Note that for attribute sensors it is nearly always recommended to use setAttribute, as this method will not update local values.
@Beta
<T> SubscriptionHandle subscribe(Entity producer,
Sensor<T> sensor,
SensorEventListener<? super T> listener)
Sensor on another entity.
SubscriptionManager.subscribe(Map, Entity, Sensor, SensorEventListener)
@Beta
<T> SubscriptionHandle subscribeToChildren(Entity parent,
Sensor<T> sensor,
SensorEventListener<? super T> listener)
SubscriptionManager.subscribeToChildren(Map, Entity, Sensor, SensorEventListener)
@Beta
<T> SubscriptionHandle subscribeToMembers(Group group,
Sensor<T> sensor,
SensorEventListener<? super T> listener)
SubscriptionManager.subscribeToMembers(Group, Sensor, SensorEventListener)@Beta boolean unsubscribe(Entity producer)
SubscriptionContext.unsubscribe(SubscriptionHandle)
@Beta
boolean unsubscribe(Entity producer,
SubscriptionHandle handle)
SubscriptionContext.unsubscribe(SubscriptionHandle)boolean removeAllPolicies()
boolean removeAllEnrichers()
ManagementContext getManagementContext()
EntityInternal#getManagementContext().
ExecutionContext getExecutionContext()
EntityInternal#getExecutionContext().
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||