Brooklyn

brooklyn.entity
[Java] Interface Entity


public interface Entity
extends java.io.Serializable

The basic interface for a Brooklyn entity.

See Also:
AbstractEntity


Method Summary
void addGroup(Group group)

Add this entity as a member of the given Group.

Entity addOwnedChild(Entity child)

Add a child Entity, and set this entity as its owner.

void clearOwner()

Clears the owner of this entity.

Application getApplication()

java.lang.String getApplicationId()

Return the id of the Application this entity is registered with.

java.lang.Object getAttribute(AttributeSensor sensor)

Gets the value of the given attribute on this entity, or null if has not been set.

java.lang.Object getConfig(ConfigKey key)

Gets the given configuration value for this entity, which may be inherited from its owner.

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 policies.

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()

Return the entities that are owned by this entity

Entity getOwner()

The owner of this entity, null if no owner.

java.util.Collection getPolicies()

@return an immutable thread-safe view of the policies.

Task invoke(Effector eff, java.util.Map parameters)

Invokes the given effector, with the given parameters to that effector.

boolean removeOwnedChild(Entity child)

Removes the specified child Entity; its owner will be set to null.

Entity setOwner(Entity group)

Sets the owner of this entity.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

addGroup

public void addGroup(Group group)
Add this entity as a member of the given Group.


addOwnedChild

public Entity addOwnedChild(Entity child)
Add a child Entity, and set this entity as its owner.


clearOwner

public void clearOwner()
Clears the owner of this entity. Also cleans up any references within its parent entity.
See Also:
getOwner
setOwner


getApplication

public Application getApplication()


getApplicationId

public java.lang.String getApplicationId()
Return the id of the Application this entity is registered with.


getAttribute

public java.lang.Object getAttribute(AttributeSensor sensor)
Gets the value of the given attribute on this entity, or null if has not been set. Attributes can be things like workrate and status information, as well as configuration (e.g. url/jmxHost/jmxPort), etc.


getConfig

public java.lang.Object getConfig(ConfigKey key)
Gets the given configuration value for this entity, which may be inherited from its owner.


getDisplayName

public java.lang.String getDisplayName()
A display name; recommended to be a concise single-line description.


getEnrichers

public java.util.Collection getEnrichers()
Returns:
an immutable thread-safe view of the policies.


getEntityType

public EntityType getEntityType()
Information about the type of this entity; analogous to Java's object.getClass.


getGroups

public java.util.Collection getGroups()
The java.util.Collection of Groups that this entity is a member of. Groupings can be used to allow easy management/monitoring of a group of entities.


getId

public java.lang.String getId()
The unique identifier for this entity.


getLocations

public java.util.Collection getLocations()
Return all the Locations this entity is deployed to.


getOwnedChildren

public java.util.Collection getOwnedChildren()
Return the entities that are owned by this entity


getOwner

public Entity getOwner()
The owner of this entity, null if no owner. The owner is normally the entity responsible for creating/destroying this entity.
See Also:
setOwner(Group)
clearOwner


getPolicies

public java.util.Collection getPolicies()
Returns:
an immutable thread-safe view of the policies.


invoke

public Task invoke(Effector eff, java.util.Map parameters)
Invokes the given effector, with the given parameters to that effector.


removeOwnedChild

public boolean removeOwnedChild(Entity child)
Removes the specified child Entity; its owner will be set to null.
Returns:
True if the given entity was contained in the set of children


setOwner

public Entity setOwner(Entity group)
Sets the owner of this entity. Returns this entity, for convenience.
See Also:
getOwner
clearOwner


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.