public abstract class AbstractEntity extends AbstractBrooklynObject implements EntityLocal, EntityInternal
Entity implementation, which should be extended whenever implementing an entity.
 
 Provides several common fields (displayName, AbstractBrooklynObject.id), and supports the core features of
 an entity such as configuration keys, attributes, subscriptions and effector invocation.
 
 If a sub-class is creating other entities, this should be done in an overridden init()
 method.
 
Note that config is typically inherited by children, whereas the fields and attributes are not.
Though currently Groovy code, this is very likely to change to pure Java in a future release of Brooklyn so Groovy'isms should not be relied on.
Sub-classes should have a no-argument constructor. When brooklyn creates an entity, it will:
setDisplayName(String)
   setManagementContext(ManagementContextInternal)
   setProxy(Entity); the proxy should be used by everything else when referring 
       to this entity (except for drivers/policies that are attached to the entity, which can be  
       given a reference to this entity itself).
   configure(Map) and then setConfig(ConfigKey, Object)
   init()
   addPolicy(Policy) (for any policies defined in the EntitySpec)
   setParent(Entity), if a parent is specified in the EntitySpec
 The legacy (pre 0.5) mechanism for creating entities is for others to call the constructor directly. This is now deprecated.
EntityInternal.FeedSupportBrooklynObject.TagSupport| Modifier and Type | Field and Description | 
|---|---|
| static BasicNotificationSensor<Entity> | CHILD_ADDED | 
| static BasicNotificationSensor<Entity> | CHILD_REMOVED | 
| static BasicNotificationSensor<java.lang.String> | EFFECTOR_ADDED | 
| static BasicNotificationSensor<java.lang.String> | EFFECTOR_CHANGED | 
| static BasicNotificationSensor<java.lang.String> | EFFECTOR_REMOVED | 
| static BasicNotificationSensor<PolicyDescriptor> | POLICY_ADDED | 
| static BasicNotificationSensor<PolicyDescriptor> | POLICY_REMOVED | 
| static BasicNotificationSensor<Sensor> | SENSOR_ADDED | 
| static BasicNotificationSensor<Sensor> | SENSOR_REMOVED | 
| Constructor and Description | 
|---|
| AbstractEntity() | 
| AbstractEntity(Entity parent)Deprecated. 
 since 0.5; instead use no-arg constructor with EntityManager().createEntity(spec) | 
| AbstractEntity(java.util.Map flags)Deprecated. 
 since 0.5; instead use no-arg constructor with EntityManager().createEntity(spec) | 
| AbstractEntity(java.util.Map flags,
              Entity parent)Deprecated. 
 since 0.5; instead use no-arg constructor with EntityManager().createEntity(spec) | 
| Modifier and Type | Method and Description | 
|---|---|
| <T extends Entity>  | addChild(EntitySpec<T> spec)Creates an entity using the given spec, and adds it as a child of this entity. | 
| <T extends Entity>  | addChild(T child)Adds the given entity as a child of this parent and sets this entity as the parent of the child;
 returns argument passed in, for convenience. | 
| void | addEnricher(Enricher enricher)Adds the given enricher to this entity. | 
| <T extends Enricher>  | addEnricher(EnricherSpec<T> spec)Adds the given enricher to this entity. | 
| <T extends Feed>  | addFeed(T feed)Convenience, which calls  EntityInternal.feeds()andFeedSupport#addFeed(Feed). | 
| void | addGroup(Group e)Add this entity as a member of the given  Group. | 
| void | addLocations(java.util.Collection<? extends Location> newLocations) | 
| void | addPolicy(Policy policy)Adds the given policy to this entity. | 
| <T extends Policy>  | addPolicy(PolicySpec<T> spec)Adds the given policy to this entity. | 
| boolean | addTag(java.lang.Object tag) | 
| void | clearLocations() | 
| void | clearParent()Clears the parent (i.e. | 
| <T> AbstractEntity | configure(ConfigKey.HasConfigKey<T> key,
         java.lang.String value) | 
| <T> AbstractEntity | configure(ConfigKey.HasConfigKey<T> key,
         T value) | 
| <T> AbstractEntity | configure(ConfigKey<T> key,
         java.lang.String value) | 
| <T> AbstractEntity | configure(ConfigKey<T> key,
         T value)Sets a config key value, and returns this Entity instance for use in fluent-API style coding. | 
| AbstractEntity | configure(java.util.Map flags)Deprecated. 
 since 0.7.0; only used for legacy brooklyn types where constructor is called directly | 
| boolean | containsTag(java.lang.Object tag) | 
| void | destroy()Should be invoked at end-of-life to clean up the item. | 
| <T> void | emit(Sensor<T> sensor,
    T val)Emits a  SensorEventevent on behalf of this entity (as though produced by this entity). | 
| <T> void | emitInternal(Sensor<T> sensor,
            T val) | 
| boolean | equals(java.lang.Object o) | 
| EntityInternal.FeedSupport | feeds() | 
| Location | firstLocation() | 
| java.util.Map<AttributeSensor,java.lang.Object> | getAllAttributes() | 
| java.util.Map<ConfigKey<?>,java.lang.Object> | getAllConfig() | 
| ConfigBag | getAllConfigBag()Returns a read-only view of all the config key/value pairs on this entity, backed by a string-based map, 
 including config names that did not match anything on this entity. | 
| Application | getApplication()Returns the application, looking it up if not yet known (registering if necessary) | 
| java.lang.String | getApplicationId() | 
| <T> T | getAttribute(AttributeSensor<T> attribute)Gets the value of the given attribute on this entity, or null if has not been set. | 
| <T> T | getAttributeByNameParts(java.util.List<java.lang.String> nameParts) | 
| java.util.Collection<Entity> | getChildren()Return the entities that are children of (i.e. | 
| <T> T | getConfig(ConfigKey.HasConfigKey<T> key) | 
| <T> T | getConfig(ConfigKey.HasConfigKey<T> key,
         T defaultValue) | 
| <T> T | getConfig(ConfigKey<T> key)Gets the given configuration value for this entity, in the following order of preference:
  value (including null) explicitly set on the entity
  value (including null) explicitly set on an ancestor (inherited)
  a default value (including null) on the best equivalent static key of the same name declared on the entity
      (where best equivalence is defined as preferring a config key which extends another, 
      as computed in EntityDynamicType.getConfigKeys)
  a default value (including null) on the key itself
  null | 
| <T> T | getConfig(ConfigKey<T> key,
         T defaultValue) | 
| EntityConfigMap | getConfigMap() | 
| Maybe<java.lang.Object> | getConfigRaw(ConfigKey.HasConfigKey<?> key,
            boolean includeInherited) | 
| Maybe<java.lang.Object> | getConfigRaw(ConfigKey<?> key,
            boolean includeInherited)Returns the uncoerced value for this config key as set on this entity, if available,
 not following any inheritance chains and not taking any default. | 
| long | getCreationTime()Returns the creation time for this entity, in UTC. | 
| java.lang.String | getDisplayName()A display name; recommended to be a concise single-line description. | 
| Effector<?> | getEffector(java.lang.String effectorName)Convenience for finding named effector in  EntityType.getEffectors()Map. | 
| java.util.Collection<Enricher> | getEnrichers() | 
| EntityType | getEntityType()Information about the type of this entity; analogous to Java's object.getClass. | 
| ExecutionContext | getExecutionContext()Returns the task execution context for the entity. | 
| EntityInternal.FeedSupport | getFeedSupport()Deprecated.  | 
| java.util.Collection<Group> | getGroups()The  CollectionofGroups that this entity is a member of. | 
| java.lang.String | getIconUrl()A URL pointing to an image which can be used to represent this entity. | 
| ConfigBag | getLocalConfigBag()Returns a read-only view of the local (i.e. | 
| java.util.Collection<Location> | getLocations()Return all the  Locations this entity is deployed to. | 
| ManagementContext | getManagementContext()Returns the management context for the entity. | 
| EntityManagementSupport | getManagementSupport() | 
| EntityDynamicType | getMutableEntityType()returns the dynamic type corresponding to the type of this entity instance | 
| Entity | getParent()The parent of this entity, null if no parent. | 
| java.util.Collection<Policy> | getPolicies() | 
| Entity | getProxy() | 
| Entity | getProxyIfAvailable()Returns the proxy, or if not available (because using legacy code) then returns the real entity. | 
| RebindSupport<EntityMemento> | getRebindSupport()As described in  EntityInternal.getRebindSupport()... | 
| SubscriptionContext | getSubscriptionContext() | 
| java.util.Set<java.lang.Object> | getTags() | 
| int | hashCode() | 
| void | init()Default entity initialization, just calls  initEnrichers(). | 
| void | invalidateReferences()For use by management plane, to invalidate all fields (e.g. | 
| <T> Task<T> | invoke(Effector<T> eff)Invoke an  Effectordirectly. | 
| <T> Task<T> | invoke(Effector<T> eff,
      java.util.Map<java.lang.String,?> parameters)Additional form supplied for when the parameter map needs to be made explicit. | 
| <T> Task<T> | invoke(java.util.Map parameters,
      Effector<T> eff) | 
| <T> T | modifyAttribute(AttributeSensor<T> attribute,
               com.google.common.base.Function<? super T,Maybe<T>> modifier)Atomically modifies the  AttributeSensor, ensuring that only one modification is done
 at a time. | 
| void | onManagementBecomingMaster()Deprecated. 
 since 0.4.0 override EntityManagementSupport.onManagementStarted if customization needed | 
| void | onManagementNoLongerMaster()Deprecated. 
 since 0.4.0 override EntityManagementSupport.onManagementStopped if customization needed | 
| void | onManagementStarted()Invoked by  EntityManagementSupportwhen this entity is fully managed and visible to other entities
 through the management context. | 
| void | onManagementStarting()Invoked by  EntityManagementSupportwhen this entity is becoming managed (i.e. | 
| void | onManagementStopped()Invoked by  EntityManagementSupportwhen this entity is fully unmanaged. | 
| void | refreshInheritedConfig() | 
| boolean | removeAllEnrichers()Removes all enricher from this entity. | 
| boolean | removeAllPolicies()Removes all policy from this entity. | 
| void | removeAttribute(AttributeSensor<?> attribute) | 
| boolean | removeChild(Entity child)Removes the specified child  Entity; its parent will be set to null. | 
| boolean | removeEnricher(Enricher enricher)Removes the given enricher from this entity. | 
| void | removeGroup(Group e)Removes this entity as a member of the given  Group. | 
| void | removeLocations(java.util.Collection<? extends Location> removedLocations) | 
| boolean | removePolicy(Policy policy)Removes the given policy from this entity. | 
| boolean | removeTag(java.lang.Object tag) | 
| void | requestPersist()Can be called to request that the entity be persisted. | 
| void | resetProxy(Entity proxy)internal use only | 
| <T> T | setAttribute(AttributeSensor<T> attribute,
            T val)Sets the  AttributeSensordata for the given attribute to the specified value. | 
| <T> T | setAttribute(AttributeSensorAndConfigKey<?,T> configuredSensor)Deprecated. 
 on interface since 0.5.0; use  ConfigToAttributes.apply(EntityLocal, AttributeSensorAndConfigKey) | 
| <T> T | setAttributeWithoutPublishing(AttributeSensor<T> attribute,
                             T val)Like  EntityLocal.setAttribute(AttributeSensor, Object), except does not publish an attribute-change event. | 
| <T> T | setConfig(ConfigKey.HasConfigKey<T> key,
         DeferredSupplier val) | 
| <T> T | setConfig(ConfigKey.HasConfigKey<T> key,
         T val) | 
| <T> T | setConfig(ConfigKey.HasConfigKey<T> key,
         Task<T> val) | 
| <T> T | setConfig(ConfigKey<T> key,
         DeferredSupplier val) | 
| <T> T | setConfig(ConfigKey<T> key,
         T val)Must be called before the entity is managed. | 
| <T> T | setConfig(ConfigKey<T> key,
         Task<T> val) | 
| <T> T | setConfigEvenIfOwned(ConfigKey.HasConfigKey<T> key,
                    T val) | 
| <T> T | setConfigEvenIfOwned(ConfigKey<T> key,
                    T val) | 
| void | setDisplayName(java.lang.String newDisplayName)Sets the entity's display name. | 
| void | setManagementContext(ManagementContextInternal managementContext) | 
| AbstractEntity | setParent(Entity entity)Adds this as a child of the given entity; registers with application if necessary. | 
| void | setProxy(Entity proxy)internal use only | 
| <T> SubscriptionHandle | subscribe(Entity producer,
         Sensor<T> sensor,
         SensorEventListener<? super T> listener)Allow us to subscribe to data from a  Sensoron another entity. | 
| <T> SubscriptionHandle | subscribeToChildren(Entity parent,
                   Sensor<T> sensor,
                   SensorEventListener<? super T> listener) | 
| <T> SubscriptionHandle | subscribeToMembers(Group group,
                  Sensor<T> sensor,
                  SensorEventListener<? super T> listener) | 
| java.util.Map<java.lang.String,java.lang.String> | toMetadataRecord() | 
| java.lang.String | toString()Default String representation is simplified name of class, together with selected fields. | 
| boolean | unsubscribe(Entity producer)Unsubscribes the given producer. | 
| boolean | unsubscribe(Entity producer,
           SubscriptionHandle handle)Unsubscribes the given handle. | 
getCatalogItemId, getId, getTagSupport, rebind, setCatalogItemId, tagssetCatalogItemIdgetCatalogItemId, getTagSupport, tagspublic static final BasicNotificationSensor<Sensor> SENSOR_ADDED
public static final BasicNotificationSensor<Sensor> SENSOR_REMOVED
public static final BasicNotificationSensor<java.lang.String> EFFECTOR_ADDED
public static final BasicNotificationSensor<java.lang.String> EFFECTOR_REMOVED
public static final BasicNotificationSensor<java.lang.String> EFFECTOR_CHANGED
public static final BasicNotificationSensor<PolicyDescriptor> POLICY_ADDED
public static final BasicNotificationSensor<PolicyDescriptor> POLICY_REMOVED
public static final BasicNotificationSensor<Entity> CHILD_ADDED
public static final BasicNotificationSensor<Entity> CHILD_REMOVED
public AbstractEntity()
@Deprecated public AbstractEntity(java.util.Map flags)
@Deprecated public AbstractEntity(Entity parent)
@Deprecated
public AbstractEntity(java.util.Map flags,
                         Entity parent)
@Deprecated public AbstractEntity configure(java.util.Map flags)
AbstractBrooklynObjectConfigBag.getUnusedConfig().
 To be overridden by AbstractEntity, AbstractLoation, AbstractPolicy, AbstractEnricher, etc.
But should not be overridden by specific entity types. If you do, the entity may break in subsequent releases. Also note that if you require fields to be initialized you must do that in this method. You must *not* rely on field initializers because they may not run until *after* this method (this method is invoked by the constructor in this class, so initializers in subclasses will not have run when this overridden method is invoked.)
configure in interface EntityInternalpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object@Beta public void setProxy(Entity proxy)
@Beta public void resetProxy(Entity proxy)
public Entity getProxy()
@Beta public Entity getProxyIfAvailable()
public <T> AbstractEntity configure(ConfigKey<T> key, T value)
public <T> AbstractEntity configure(ConfigKey<T> key, java.lang.String value)
public <T> AbstractEntity configure(ConfigKey.HasConfigKey<T> key, T value)
public <T> AbstractEntity configure(ConfigKey.HasConfigKey<T> key, java.lang.String value)
public void setManagementContext(ManagementContextInternal managementContext)
setManagementContext in class AbstractBrooklynObjectpublic java.util.Map<java.lang.String,java.lang.String> toMetadataRecord()
toMetadataRecord in interface EntityInternalpublic long getCreationTime()
EntitygetCreationTime in interface Entitypublic java.lang.String getDisplayName()
EntitygetDisplayName in interface BrooklynObjectgetDisplayName in interface Entitypublic java.lang.String getIconUrl()
EntitygetIconUrl in interface Entitypublic void setDisplayName(java.lang.String newDisplayName)
EntityLocalsetDisplayName in interface EntityLocalsetDisplayName in class AbstractBrooklynObjectpublic AbstractEntity setParent(Entity entity)
setParent in interface EntityEntity.getParent(), 
Entity.clearParent()public void clearParent()
EntityclearParent in interface EntityEntity.getParent(), 
Entity.setParent(brooklyn.entity.Entity)public <T extends Entity> T addChild(T child)
 The child is NOT managed, even if the parent is already managed at this point
 (e.g. the child is added *after* the parent's init() is invoked)
 and so will need an explicit getEntityManager().manage(childReturnedFromThis) call.
 These semantics are currently under review.
public <T extends Entity> T addChild(EntitySpec<T> spec)
addChild in interface Entityjava.lang.IllegalArgumentException - If spec.getParent() is set and is different from this entityaddChild(Entity), 
EntityManager.createEntity(EntitySpec)public boolean removeChild(Entity child)
EntityEntity; its parent will be set to null.removeChild in interface Entitypublic void addGroup(Group e)
EntityGroup. Called by framework.
 
 Users should call Group.addMember(Entity) instead; this method will then 
 automatically be called. However, the reverse is not true (calling this method will 
 not tell the group; this behaviour may change in a future release!)
public void removeGroup(Group e)
EntityGroup. Called by framework.
 
 Users should call Group.removeMember(Entity) instead; this method will then 
 automatically be called. However, the reverse is not true (calling this method will 
 not tell the group; this behaviour may change in a future release!)
removeGroup in interface Entitypublic Entity getParent()
EntitygetParent in interface EntityEntity.setParent(Entity), 
Entity.clearParent()public java.util.Collection<Entity> getChildren()
EntitygetChildren in interface Entitypublic java.util.Collection<Group> getGroups()
EntityCollection of Groups that this entity is a member of.
 Groupings can be used to allow easy management/monitoring of a group of entities.public Application getApplication()
getApplication in interface EntityApplication this entity is registered with, or null if not registered.public java.lang.String getApplicationId()
getApplicationId in interface EntityApplication this entity is registered with, or null if not registered.public ManagementContext getManagementContext()
EntityInternalgetManagementContext in interface EntityInternalgetManagementContext in class AbstractBrooklynObjectpublic EntityType getEntityType()
EntitygetEntityType in interface Entitypublic EntityDynamicType getMutableEntityType()
EntityInternalgetMutableEntityType in interface EntityInternalpublic java.util.Collection<Location> getLocations()
EntityLocations this entity is deployed to.getLocations in interface Entitypublic void addLocations(java.util.Collection<? extends Location> newLocations)
addLocations in interface EntityInternalpublic void removeLocations(java.util.Collection<? extends Location> removedLocations)
removeLocations in interface EntityInternalpublic void clearLocations()
clearLocations in interface EntityInternalpublic Location firstLocation()
public void destroy()
destroy in interface EntityInternalpublic <T> T getAttribute(AttributeSensor<T> attribute)
EntitygetAttribute in interface Entitypublic <T> T getAttributeByNameParts(java.util.List<java.lang.String> nameParts)
public <T> T setAttribute(AttributeSensor<T> attribute, T val)
EntityLocalAttributeSensor 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.setAttribute in interface EntityLocalnull)public <T> T setAttributeWithoutPublishing(AttributeSensor<T> attribute, T val)
EntityInternalEntityLocal.setAttribute(AttributeSensor, Object), except does not publish an attribute-change event.setAttributeWithoutPublishing in interface EntityInternal@Beta public <T> T modifyAttribute(AttributeSensor<T> attribute, com.google.common.base.Function<? super T,Maybe<T>> modifier)
EntityLocalAttributeSensor, ensuring that only one modification is done
 at a time.
 
 If the modifier returns Maybe.absent() then the attribute will be
 left unmodified, and the existing value will be returned.
 
 For details of the synchronization model used to achieve this, refer to the underlying 
 attribute store (e.g. AttributeMap).modifyAttribute in interface EntityLocalnull)public void removeAttribute(AttributeSensor<?> attribute)
removeAttribute in interface EntityInternalpublic <T> T setAttribute(AttributeSensorAndConfigKey<?,T> configuredSensor)
ConfigToAttributes.apply(EntityLocal, AttributeSensorAndConfigKey)returns old value
public <T> T getConfig(ConfigKey<T> key)
Entitypublic <T> T getConfig(ConfigKey.HasConfigKey<T> key)
public <T> T getConfig(ConfigKey.HasConfigKey<T> key, T defaultValue)
getConfig in interface EntityLocalpublic <T> T getConfig(ConfigKey<T> key, T defaultValue)
getConfig in interface EntityLocalpublic Maybe<java.lang.Object> getConfigRaw(ConfigKey<?> key, boolean includeInherited)
EntitygetConfigRaw in interface Entitypublic Maybe<java.lang.Object> getConfigRaw(ConfigKey.HasConfigKey<?> key, boolean includeInherited)
getConfigRaw in interface Entitypublic <T> T setConfig(ConfigKey<T> key, T val)
EntityLocalsetConfig in interface EntityLocalsetConfig in interface Configurablepublic <T> T setConfig(ConfigKey<T> key, Task<T> val)
setConfig in interface EntityLocalpublic <T> T setConfig(ConfigKey<T> key, DeferredSupplier val)
public <T> T setConfig(ConfigKey.HasConfigKey<T> key, T val)
setConfig in interface EntityLocalpublic <T> T setConfig(ConfigKey.HasConfigKey<T> key, Task<T> val)
setConfig in interface EntityLocalpublic <T> T setConfig(ConfigKey.HasConfigKey<T> key, DeferredSupplier val)
public <T> T setConfigEvenIfOwned(ConfigKey<T> key, T val)
public <T> T setConfigEvenIfOwned(ConfigKey.HasConfigKey<T> key, T val)
public void refreshInheritedConfig()
refreshInheritedConfig in interface EntityInternalpublic EntityConfigMap getConfigMap()
getConfigMap in interface EntityInternalpublic java.util.Map<ConfigKey<?>,java.lang.Object> getAllConfig()
getAllConfig in interface EntityInternal@Beta public ConfigBag getAllConfigBag()
EntityInternalgetAllConfigBag in interface EntityInternal@Beta public ConfigBag getLocalConfigBag()
EntityInternalgetLocalConfigBag in interface EntityInternalpublic java.util.Map<AttributeSensor,java.lang.Object> getAllAttributes()
getAllAttributes in interface EntityInternalpublic <T> SubscriptionHandle subscribe(Entity producer, Sensor<T> sensor, SensorEventListener<? super T> listener)
EntityLocalSensor on another entity.subscribe in interface EntityLocalEntityLocal.subscribe(brooklyn.entity.Entity, brooklyn.event.Sensor<T>, brooklyn.event.SensorEventListener<? super T>)public <T> SubscriptionHandle subscribeToChildren(Entity parent, Sensor<T> sensor, SensorEventListener<? super T> listener)
public <T> SubscriptionHandle subscribeToMembers(Group group, Sensor<T> sensor, SensorEventListener<? super T> listener)
public boolean unsubscribe(Entity producer)
unsubscribe in interface EntityLocalSubscriptionContext.unsubscribe(SubscriptionHandle)public boolean unsubscribe(Entity producer, SubscriptionHandle handle)
unsubscribe in interface EntityLocalSubscriptionContext.unsubscribe(SubscriptionHandle)public SubscriptionContext getSubscriptionContext()
getSubscriptionContext in interface EntityInternalpublic ExecutionContext getExecutionContext()
EntityInternalgetExecutionContext in interface EntityInternalpublic java.lang.String toString()
toString in class java.lang.Objectpublic void init()
initEnrichers().init in class AbstractBrooklynObjectpublic java.util.Collection<Policy> getPolicies()
getPolicies in interface Entitypublic void addPolicy(Policy policy)
Entitypublic <T extends Policy> T addPolicy(PolicySpec<T> spec)
Entitypublic <T extends Enricher> T addEnricher(EnricherSpec<T> spec)
EntityaddEnricher in interface Entitypublic boolean removePolicy(Policy policy)
EntityremovePolicy in interface Entitypublic boolean removeAllPolicies()
EntityLocalremoveAllPolicies in interface EntityLocalpublic java.util.Collection<Enricher> getEnrichers()
getEnrichers in interface Entitypublic void addEnricher(Enricher enricher)
EntityaddEnricher in interface Entitypublic boolean removeEnricher(Enricher enricher)
EntityremoveEnricher in interface Entitypublic boolean removeAllEnrichers()
EntityLocalremoveAllEnrichers in interface EntityLocalpublic <T extends Feed> T addFeed(T feed)
EntityInternal.feeds() and FeedSupport#addFeed(Feed).public EntityInternal.FeedSupport feeds()
feeds in interface EntityInternal@Deprecated public EntityInternal.FeedSupport getFeedSupport()
getFeedSupport in interface EntityInternalpublic <T> void emit(Sensor<T> sensor, T val)
EntityLocalSensorEvent 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.
emit in interface EntityLocalpublic <T> void emitInternal(Sensor<T> sensor, T val)
public Effector<?> getEffector(java.lang.String effectorName)
EntityType.getEffectors() Map.getEffector in interface EntityInternalpublic <T> Task<T> invoke(Effector<T> eff, java.util.Map<java.lang.String,?> parameters)
invoke in interface Entityinvoke(Effector)public void onManagementStarting()
EntityManagementSupport when this entity is becoming managed (i.e. it has a working
 management context, but before the entity is visible to other entities), including during a rebind.public void onManagementStarted()
EntityManagementSupport when this entity is fully managed and visible to other entities
 through the management context.public void onManagementBecomingMaster()
ManagementContext when this entity becomes managed at a particular management node,
 including the initial management started and subsequent management node master-change for this entity.public void onManagementNoLongerMaster()
ManagementContext when this entity becomes mastered at a particular management node,
 including the final management end and subsequent management node master-change for this entity.public void onManagementStopped()
EntityManagementSupport when this entity is fully unmanaged.
 Note that the activies possible here (when unmanaged) are limited, and that this event may be caused by either a brooklyn node itself being demoted (so the entity is managed elsewhere) or by a controlled shutdown.
public void invalidateReferences()
public EntityManagementSupport getManagementSupport()
getManagementSupport in interface EntityInternalpublic void requestPersist()
EntityInternalrequestPersist in interface EntityInternal@Beta public RebindSupport<EntityMemento> getRebindSupport()
EntityInternal.getRebindSupport()...
 Users are strongly discouraged to call or override this method.
 It is for internal calls only, relating to persisting/rebinding entities.
 This method may change (or be removed) in a future release without notice.getRebindSupport in interface EntityInternalgetRebindSupport in interface Rebindablepublic boolean removeTag(java.lang.Object tag)
public boolean containsTag(java.lang.Object tag)
containsTag in interface Entity