|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
brooklyn.entity.Entity brooklyn.entity.rebind.Rebindable
public interface Entity extends java.io.Serializable, Rebindable
The basic interface for a Brooklyn entity.
Implementors of entities are strongly encouraged to extend AbstractEntity.
To instantiate an entity, see managementContext.getEntityManager().createEntity(entitySpec). Also see ApplicationBuilder, AbstractEntity.addChild, and EntitySpecs.
Entities may not be java.io.Serializable in subsequent releases!
Method Summary | |
---|---|
Entity
|
addChild(Entity child)
Add a child Entity, and set this entity as its parent, returning the added child. |
java.lang.Object
|
addChild(EntitySpec spec)
Creates an Entity from the given spec and adds it, setting this entity as the 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()
@return the Application this entity is registered with, or null if not registered. |
java.lang.String
|
getApplicationId()
@return the id of the Application this entity is registered with, or null if not registered. |
java.lang.Object
|
getAttribute(AttributeSensor sensor)
Gets the value of the given attribute on this entity, or null if has not been set. |
java.util.Collection
|
getChildren()
Return the entities that are children of (i.e. |
java.lang.Object
|
getConfig(ConfigKey key)
Gets the given configuration value for this entity, which may be inherited from its parent. |
java.lang.String
|
getDisplayName()
A display name; recommended to be a concise single-line description. |
java.util.Collection
|
getEnrichers()
@return an immutable thread-safe view of the enrichers. |
EntityType
|
getEntityType()
Information about the type of this entity; analogous to Java's object.getClass. |
java.util.Collection
|
getGroups()
The java.util.Collection of Groups that this entity is a member of. |
java.lang.String
|
getId()
The unique identifier for this entity. |
java.util.Collection
|
getLocations()
Return all the Locations this entity is deployed to. |
java.util.Collection
|
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. |
java.util.Collection
|
getPolicies()
@return an immutable thread-safe view of the policies. |
RebindSupport
|
getRebindSupport()
|
Task
|
invoke(Effector eff, java.util.Map 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 Rebindable | |
---|---|
getRebindSupport |
Method Detail |
---|
public Entity addChild(Entity child)
public java.lang.Object addChild(EntitySpec spec)
public void addEnricher(Enricher enricher)
public void addGroup(Group group)
@Deprecated public Entity addOwnedChild(Entity child)
public void addPolicy(Policy policy)
@Deprecated public void clearOwner()
public void clearParent()
public Application getApplication()
public java.lang.String getApplicationId()
public java.lang.Object getAttribute(AttributeSensor sensor)
public java.util.Collection getChildren()
public java.lang.Object getConfig(ConfigKey key)
public java.lang.String getDisplayName()
public java.util.Collection getEnrichers()
public EntityType getEntityType()
public java.util.Collection getGroups()
public java.lang.String getId()
public java.util.Collection getLocations()
@Deprecated public java.util.Collection getOwnedChildren()
@Deprecated public Entity getOwner()
public Entity getParent()
public java.util.Collection getPolicies()
@Override public RebindSupport getRebindSupport()
public Task invoke(Effector eff, java.util.Map parameters)
public boolean removeChild(Entity child)
public boolean removeEnricher(Enricher enricher)
@Deprecated public boolean removeOwnedChild(Entity child)
public boolean removePolicy(Policy policy)
@Deprecated public Entity setOwner(Entity group)
public Entity setParent(Entity parent)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.