|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Entity
The basic interface for a Brooklyn entity.
Implementors of entities are strongly encouraged to extend brooklyn.entity.basic.AbstractEntity.
To instantiate an entity, see managementContext.getEntityManager().createEntity(entitySpec).
Also see brooklyn.entity.basic.ApplicationBuilder,
brooklyn.entity.basic.AbstractEntity#addChild(EntitySpec), and
brooklyn.entity.proxying.EntitySpecs.
Entities may not be Serializable in subsequent releases!
brooklyn.entity.basic.AbstractEntity| Method Summary | ||
|---|---|---|
Entity |
addChild(Entity child)
Add a child Entity, and set this entity as its parent,
returning the added child. |
|
void |
addEnricher(Enricher enricher)
Adds the given enricher to this entity. |
|
void |
addGroup(Group group)
Add this entity as a member of the given Group. |
|
Entity |
addOwnedChild(Entity child)
Deprecated. since 0.5; see addChild(Entity) |
|
void |
addPolicy(Policy policy)
Adds the given policy to this entity. |
|
void |
clearOwner()
Deprecated. since 0.5; see clearParent() |
|
void |
clearParent()
Clears the parent (i.e. |
|
Application |
getApplication()
|
|
String |
getApplicationId()
|
|
|
getAttribute(AttributeSensor<T> sensor)
Gets the value of the given attribute on this entity, or null if has not been set. |
|
Collection<Entity> |
getChildren()
Return the entities that are children of (i.e. |
|
|
getConfig(ConfigKey<T> key)
Gets the given configuration value for this entity, which may be inherited from its parent. |
|
String |
getDisplayName()
A display name; recommended to be a concise single-line description. |
|
Collection<Enricher> |
getEnrichers()
|
|
EntityType |
getEntityType()
Information about the type of this entity; analogous to Java's object.getClass. |
|
Collection<Group> |
getGroups()
The Collection of Groups that this entity is a member of. |
|
String |
getId()
The unique identifier for this entity. |
|
Collection<Location> |
getLocations()
Return all the Locations this entity is deployed to. |
|
Collection<Entity> |
getOwnedChildren()
Deprecated. since 0.5; see getChildren() |
|
Entity |
getOwner()
Deprecated. since 0.5; see getParent() |
|
Entity |
getParent()
The parent of this entity, null if no parent. |
|
Collection<Policy> |
getPolicies()
|
|
|
invoke(Effector<T> eff,
Map<String,?> parameters)
Invokes the given effector, with the given parameters to that effector. |
|
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. |
|
boolean |
removeOwnedChild(Entity child)
Deprecated. since 0.5; see removeChild(Entity) |
|
boolean |
removePolicy(Policy policy)
Removes the given policy from this entity. |
|
Entity |
setOwner(Entity group)
Deprecated. since 0.5; see setOwner(Entity) |
|
Entity |
setParent(Entity parent)
Sets the parent (i.e. |
|
| Methods inherited from interface brooklyn.entity.rebind.Rebindable |
|---|
getRebindSupport |
| Method Detail |
|---|
String getId()
String getDisplayName()
EntityType getEntityType()
Application getApplication()
Application this entity is registered with, or null if not registered.String getApplicationId()
Application this entity is registered with, or null if not registered.Entity getParent()
setParent(Entity),
clearParent()Collection<Entity> getChildren()
Entity setParent(Entity parent)
getParent(),
clearParent()void clearParent()
getParent(),
setParent(brooklyn.entity.Entity)Entity addChild(Entity child)
Entity, and set this entity as its parent,
returning the added child.
TODO Signature will change to <T extends Entity> T addChild(T child), but
that currently breaks groovy AbstractEntity subclasses sometimes so deferring that
until (hopefully) the next release.
boolean removeChild(Entity child)
Entity; its parent will be set to null.
@Deprecated Entity getOwner()
@Deprecated Collection<Entity> getOwnedChildren()
@Deprecated Entity setOwner(Entity group)
@Deprecated void clearOwner()
@Deprecated Entity addOwnedChild(Entity child)
@Deprecated boolean removeOwnedChild(Entity child)
Collection<Policy> getPolicies()
Collection<Enricher> getEnrichers()
Collection<Group> getGroups()
Collection of Groups that this entity is a member of.
Groupings can be used to allow easy management/monitoring of a group of entities.
void addGroup(Group group)
Group.
Collection<Location> getLocations()
Locations this entity is deployed to.
<T> T getAttribute(AttributeSensor<T> sensor)
<T> T getConfig(ConfigKey<T> key)
<T> Task<T> invoke(Effector<T> eff,
Map<String,?> parameters)
void addPolicy(Policy policy)
boolean removePolicy(Policy policy)
void addEnricher(Enricher enricher)
boolean removeEnricher(Enricher enricher)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||