Brooklyn

brooklyn.entity.basic
[Groovy] Class AbstractEntity

java.lang.Object
  groovy.lang.GroovyObjectSupport
      brooklyn.entity.basic.AbstractEntity
All Implemented Interfaces:
EntityInternal, EntityLocal, groovy.lang.GroovyInterceptable

abstract class AbstractEntity
extends groovy.lang.GroovyObjectSupport

Default Entity implementation, which should be extended whenever implementing an entity.

Provides several common fields (name, 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:

  1. Construct the entity via the no-argument constructor
  2. Call setDisplayName(String)
  3. Call setManagementContext(ManagementContextInternal)
  4. Call 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).
  5. Call configure(Map) and then setConfig(ConfigKey, Object)
  6. Call init()
  7. Call addPolicy() (for any policies defined in the EntitySpec)
  8. Call 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.


Field Summary
protected static Logger LOG

static BasicNotificationSensor POLICY_ADDED

static BasicNotificationSensor POLICY_REMOVED

static BasicNotificationSensor SENSOR_ADDED

static BasicNotificationSensor SENSOR_REMOVED

protected SubscriptionTracker _subscriptionTracker

protected AttributeMap attributesInternal

The sensor-attribute values of this entity.

protected EntityConfigMap configsInternal

The config values of this entity.

protected EntityManagementSupport managementSupport

protected java.util.Map tempWorkings

For temporary data, e.g. timestamps etc for calculating real attribute values, such as when calculating averages over time etc.

 
Property Summary
EntityCollectionReference children

java.util.Collection enrichers

EntityCollectionReference groups

java.util.Collection locations

java.util.Collection policies

java.util.Map presentationAttributes

boolean previouslyOwned

 
Constructor Summary
AbstractEntity()

AbstractEntity(java.util.Map flags)

@deprecated since 0.5; instead use no-arg constructor with EntityManager().createEntity(spec)

AbstractEntity(Entity parent)

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

 
Method Summary
Entity addChild(Entity 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.

java.lang.Object addChild(EntitySpec spec)

Creates an entity using the given spec, and adds it as a child of this entity.

void addEnricher(Enricher enricher)

void addGroup(Group e)

Adds this as a member of the given group, registers with application if necessary

void addLocations(java.util.Collection newLocations)

Entity addOwnedChild(Entity child)

void addPolicy(Policy policy)

protected void assertNotYetOwned()

void clearOwner()

void clearParent()

AbstractEntity configure(java.util.Map flags = [:])

sets fields from flags; can be overridden if needed, subclasses should set custom fields before _invoking_ this super (and they nearly always should invoke the super)

AbstractEntity configure(ConfigKey key, java.lang.Object value)

Sets a config key value, and returns this Entity instance for use in fluent-API style coding.

AbstractEntity configure(ConfigKey key, java.lang.String value)

AbstractEntity configure(HasConfigKey key, java.lang.Object value)

AbstractEntity configure(HasConfigKey key, java.lang.String value)

protected EntityManagementSupport createManagementSupport()

void destroy()

Should be invoked at end-of-life to clean up the item.

void emit(Sensor sensor, java.lang.Object val)

void emitInternal(Sensor sensor, java.lang.Object val)

boolean equals(java.lang.Object o)

protected void finalize()

Location firstLocation()

java.util.Map getAllAttributes()

java.util.Map getAllConfig()

Application getApplication()

Returns the application, looking it up if not yet known (registering if necessary)

java.lang.String getApplicationId()

java.lang.Object getAttribute(AttributeSensor attribute)

java.lang.Object getAttributeByNameParts(java.util.List nameParts)

java.util.Collection getChildren()

EntityCollectionReference getChildrenReference()

java.lang.Object getConfig(ConfigKey key)

java.lang.Object getConfig(HasConfigKey key)

java.lang.Object getConfig(HasConfigKey key, java.lang.Object defaultValue)

java.lang.Object getConfig(ConfigKey key, java.lang.Object defaultValue)

EntityConfigMap getConfigMap()

java.lang.String getDisplayName()

Effector getEffector(java.lang.String effectorName)

Convenience for finding named effector in getEffectors() java.util.Map.

java.util.Collection getEnrichers()

protected EntityManager getEntityManager()

EntityType getEntityType()

protected java.lang.String getEntityTypeName()

Gets the entity type name, to be returned by getEntityType().getName().

ExecutionContext getExecutionContext()

java.util.Collection getGroups()

java.lang.String getId()

java.util.Collection getLocations()

ManagementContext getManagementContext()

EntityManagementSupport getManagementSupport()

EntityDynamicType getMutableEntityType()

returns the dynamic type corresponding to the type of this entity instance

java.util.Collection getOwnedChildren()

EntityCollectionReference getOwnedChildrenReference()

Entity getOwner()

Entity getParent()

java.util.Collection getPolicies()

Entity getProxy()

Entity getProxyIfAvailable()

Returns the proxy, or if not available (because using legacy code) then returns the real entity.

RebindSupport getRebindSupport()

SubscriptionContext getSubscriptionContext()

protected SubscriptionTracker getSubscriptionTracker()

boolean hasEverBeenManaged()

FIXME Temporary workaround for use-case: - the load balancing policy test calls app.managementContext.unmanage(itemToStop) - concurrently, the policy calls an effector on that item: item.move() - The code in AbstractManagementContext.invokeEffectorMethodSync calls manageIfNecessary.

int hashCode()

void init()

Called by framework (in new-style entities) after configuring, setting parent, etc, but before a reference to this entity is shared with other entities.

void invalidateReferences()

For use by management plane, to invalidate all fields (e.g. when an entity is changing to being proxied)

Task invoke(java.util.Map parameters = [:], Effector eff)

Invoke an Effector directly.

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

Additional form supplied for when the parameter map needs to be made explicit.

Task invokeFromJava(java.util.Map parameters = [:], Effector eff)

TODO Calling the above groovy method from java gives compilation error due to use of generics This method will be removed once that is resolved in groovy (or when this is converted to pure java).

java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)

Called by groovy for all method invocations; pass-through for everything but effectors; effectors get wrapped in a new task (parented by current task if there is one).

protected boolean isLegacyConstruction()

void onManagementBecomingMaster()

Invoked by 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.

void onManagementNoLongerMaster()

Invoked by 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.

void onManagementStarted()

Invoked by EntityManagementSupport when this entity is fully managed and visible to other entities through the management context.

void onManagementStarting()

Invoked by EntityManagementSupport when this entity is becoming managed (i.e. it has a working management context, but before the entity is visible to other entities).

void refreshInheritedConfig()

void refreshInheritedConfigOfChildren()

boolean removeAllEnrichers()

boolean removeAllPolicies()

void removeAttribute(AttributeSensor attribute)

boolean removeChild(Entity child)

boolean removeEnricher(Enricher enricher)

void removeLocations(java.util.Collection newLocations)

boolean removeOwnedChild(Entity child)

boolean removePolicy(Policy policy)

protected void setApplication(Application app)

@deprecated since 0.4.0 should not be needed / leaked outwith brooklyn internals / mgmt support?

java.lang.Object setAttribute(AttributeSensor attribute, java.lang.Object val)

java.lang.Object setAttribute(AttributeSensorAndConfigKey configuredSensor)

sets the value of the given attribute sensor from the config key value herein, if the config key resolves to a non-null value as a sensor

java.lang.Object setAttributeWithoutPublishing(AttributeSensor attribute, java.lang.Object val)

void setBeingManaged()

@deprecated since 0.4.0 now handled by EntityMangementSupport

java.lang.Object setConfig(ConfigKey key, java.lang.Object val)

java.lang.Object setConfig(ConfigKey key, Task val)

java.lang.Object setConfig(ConfigKey key, DeferredSupplier val)

java.lang.Object setConfig(HasConfigKey key, java.lang.Object val)

java.lang.Object setConfig(HasConfigKey key, Task val)

java.lang.Object setConfig(HasConfigKey key, DeferredSupplier val)

java.lang.Object setConfigEvenIfOwned(ConfigKey key, java.lang.Object val)

java.lang.Object setConfigEvenIfOwned(HasConfigKey key, java.lang.Object val)

protected void setConfigIfValNonNull(ConfigKey key, java.lang.Object val)

protected void setConfigIfValNonNull(HasConfigKey key, java.lang.Object val)

void setDisplayName(java.lang.String newDisplayName)

void setManagementContext(ManagementContextInternal managementContext)

AbstractEntity setOwner(Entity entity)

AbstractEntity setParent(Entity entity)

Adds this as a child of the given entity; registers with application if necessary.

void setProxy(Entity proxy)

SubscriptionHandle subscribe(Entity producer, Sensor sensor, SensorEventListener listener)

@see EntityLocal#subscribe

SubscriptionHandle subscribeToChildren(Entity parent, Sensor sensor, SensorEventListener listener)

@see EntityLocal#subscribeToChildren

SubscriptionHandle subscribeToMembers(Group group, Sensor sensor, SensorEventListener listener)

@see EntityLocal#subscribeToMembers

java.lang.String toString()

Default String representation is simplified name of class, together with selected fields.

java.util.Collection toStringFieldsToInclude()

override this, adding to the collection, to supply fields whose value, if not null, should be included in the toString

protected ToStringHelper toStringHelper()

Override this to add to the toString(), e.g.

boolean unsubscribe(Entity producer)

Unsubscribes the given producer.

boolean unsubscribe(Entity producer, SubscriptionHandle handle)

Unsubscribes the given handle.

 
Methods inherited from class groovy.lang.GroovyObjectSupport
groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()
 
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()
 

Field Detail

LOG

protected static final Logger LOG


POLICY_ADDED

public static BasicNotificationSensor POLICY_ADDED


POLICY_REMOVED

public static BasicNotificationSensor POLICY_REMOVED


SENSOR_ADDED

public static BasicNotificationSensor SENSOR_ADDED


SENSOR_REMOVED

public static BasicNotificationSensor SENSOR_REMOVED


_subscriptionTracker

protected SubscriptionTracker _subscriptionTracker


attributesInternal

protected final AttributeMap attributesInternal
The sensor-attribute values of this entity. Updating this map should be done via getAttribute/setAttribute; it will automatically emit an attribute-change event.


configsInternal

protected final EntityConfigMap configsInternal
The config values of this entity. Updating this map should be done via getConfig/setConfig.


managementSupport

protected EntityManagementSupport managementSupport


tempWorkings

protected final java.util.Map tempWorkings
For temporary data, e.g. timestamps etc for calculating real attribute values, such as when calculating averages over time etc.


 
Property Detail

children

final EntityCollectionReference children


enrichers

java.util.Collection enrichers


groups

final EntityCollectionReference groups


locations

java.util.Collection locations


policies

java.util.Collection policies


presentationAttributes

java.util.Map presentationAttributes


previouslyOwned

boolean previouslyOwned


 
Constructor Detail

AbstractEntity

AbstractEntity()


AbstractEntity

@Deprecated
AbstractEntity(java.util.Map flags)
deprecated:
since 0.5; instead use no-arg constructor with EntityManager().createEntity(spec)


AbstractEntity

@Deprecated
AbstractEntity(Entity parent)
deprecated:
since 0.5; instead use no-arg constructor with EntityManager().createEntity(spec)


AbstractEntity

@Deprecated
AbstractEntity(java.util.Map flags, Entity parent)
deprecated:
since 0.5; instead use no-arg constructor with EntityManager().createEntity(spec)


 
Method Detail

addChild

@Override
Entity addChild(Entity 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.


addChild

@Override
java.lang.Object addChild(EntitySpec spec)
Creates an entity using the given spec, and adds it as a child of this entity.
throws:
IllegalArgumentException If spec.getParent() is set and is different from this entity
See Also:
addChild(Entity)
EntityManager#createEntity(EntitySpec)#createEntity(EntitySpec)


addEnricher

@Override
void addEnricher(Enricher enricher)


addGroup

@Override
void addGroup(Group e)
Adds this as a member of the given group, registers with application if necessary


addLocations

@Override
void addLocations(java.util.Collection newLocations)


addOwnedChild

@Override
@Deprecated // see addChild(Entity)
Entity addOwnedChild(Entity child)


addPolicy

@Override
void addPolicy(Policy policy)


assertNotYetOwned

protected void assertNotYetOwned()


clearOwner

@Override
@Deprecated // see clearParent
void clearOwner()


clearParent

@Override
void clearParent()


configure

AbstractEntity configure(java.util.Map flags = [:])
sets fields from flags; can be overridden if needed, subclasses should set custom fields before _invoking_ this super (and they nearly always should invoke the super)

note that it is usually preferred to use the SetFromFlag annotation on relevant fields so they get set automatically by this method and overriding it is unnecessary

Returns:
this entity, for fluent style initialization


configure

AbstractEntity configure(ConfigKey key, java.lang.Object value)
Sets a config key value, and returns this Entity instance for use in fluent-API style coding.


configure

AbstractEntity configure(ConfigKey key, java.lang.String value)


configure

AbstractEntity configure(HasConfigKey key, java.lang.Object value)


configure

AbstractEntity configure(HasConfigKey key, java.lang.String value)


createManagementSupport

protected EntityManagementSupport createManagementSupport()


destroy

@Override
void destroy()
Should be invoked at end-of-life to clean up the item.


emit

@Override
void emit(Sensor sensor, java.lang.Object val)


emitInternal

@Override
void emitInternal(Sensor sensor, java.lang.Object val)


equals

boolean equals(java.lang.Object o)


finalize

protected void finalize()


firstLocation

Location firstLocation()


getAllAttributes

java.util.Map getAllAttributes()


getAllConfig

java.util.Map getAllConfig()


getApplication

@Override
Application getApplication()
Returns the application, looking it up if not yet known (registering if necessary)


getApplicationId

@Override
java.lang.String getApplicationId()


getAttribute

@Override
java.lang.Object getAttribute(AttributeSensor attribute)


getAttributeByNameParts

java.lang.Object getAttributeByNameParts(java.util.List nameParts)


getChildren

@Override
java.util.Collection getChildren()


getChildrenReference

EntityCollectionReference getChildrenReference()


getConfig

@Override
java.lang.Object getConfig(ConfigKey key)


getConfig

@Override
java.lang.Object getConfig(HasConfigKey key)


getConfig

@Override
java.lang.Object getConfig(HasConfigKey key, java.lang.Object defaultValue)


getConfig

@Override
java.lang.Object getConfig(ConfigKey key, java.lang.Object defaultValue)


getConfigMap

EntityConfigMap getConfigMap()


getDisplayName

java.lang.String getDisplayName()


getEffector

Effector getEffector(java.lang.String effectorName)
Convenience for finding named effector in getEffectors() java.util.Map.


getEnrichers

@Override
java.util.Collection getEnrichers()


getEntityManager

protected EntityManager getEntityManager()


getEntityType

@Override
EntityType getEntityType()


getEntityTypeName

protected java.lang.String getEntityTypeName()
Gets the entity type name, to be returned by getEntityType().getName(). To be called by brooklyn internals only. Can be overridden to customize the name.


getExecutionContext

ExecutionContext getExecutionContext()


getGroups

@Override
java.util.Collection getGroups()


getId

java.lang.String getId()


getLocations

@Override
java.util.Collection getLocations()


getManagementContext

@Override
ManagementContext getManagementContext()


getManagementSupport

EntityManagementSupport getManagementSupport()


getMutableEntityType

EntityDynamicType getMutableEntityType()
returns the dynamic type corresponding to the type of this entity instance


getOwnedChildren

@Override
@Deprecated
java.util.Collection getOwnedChildren()


getOwnedChildrenReference

@Deprecated
EntityCollectionReference getOwnedChildrenReference()


getOwner

@Override
@Deprecated
Entity getOwner()


getParent

@Override
Entity getParent()


getPolicies

@Override
java.util.Collection getPolicies()


getProxy

Entity getProxy()


getProxyIfAvailable

@Beta
Entity getProxyIfAvailable()
Returns the proxy, or if not available (because using legacy code) then returns the real entity. This method will be deleted in a future release; it will be kept while deprecated legacy code still exists that creates entities without setting the proxy.


getRebindSupport

@Override
RebindSupport getRebindSupport()


getSubscriptionContext

SubscriptionContext getSubscriptionContext()


getSubscriptionTracker

protected SubscriptionTracker getSubscriptionTracker()


hasEverBeenManaged

boolean hasEverBeenManaged()
FIXME Temporary workaround for use-case: - the load balancing policy test calls app.managementContext.unmanage(itemToStop) - concurrently, the policy calls an effector on that item: item.move() - The code in AbstractManagementContext.invokeEffectorMethodSync calls manageIfNecessary. This detects that the item is not managed, and sets it as managed again. The item is automatically added back into the dynamic group, and the policy receives an erroneous MEMBER_ADDED event.
deprecated:
since 0.4.0 now handled by EntityMangementSupport


hashCode

int hashCode()


init

void init()
Called by framework (in new-style entities) after configuring, setting parent, etc, but before a reference to this entity is shared with other entities. To preserve backwards compatibility for if the entity is constructed directly, one can add to the start method the code below, but that means it will be called after references to this entity have been shared with other entities.
 if (isLegacyConstruction()) {
     init();
 
 }
 


invalidateReferences

void invalidateReferences()
For use by management plane, to invalidate all fields (e.g. when an entity is changing to being proxied)


invoke

Task invoke(java.util.Map parameters = [:], Effector eff)
Invoke an Effector directly.


invoke

Task invoke(Effector eff, java.util.Map parameters)
Additional form supplied for when the parameter map needs to be made explicit.
See Also:
invoke(Effector)


invokeFromJava

Task invokeFromJava(java.util.Map parameters = [:], Effector eff)
TODO Calling the above groovy method from java gives compilation error due to use of generics This method will be removed once that is resolved in groovy (or when this is converted to pure java).


invokeMethod

java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)
Called by groovy for all method invocations; pass-through for everything but effectors; effectors get wrapped in a new task (parented by current task if there is one).


isLegacyConstruction

protected boolean isLegacyConstruction()


onManagementBecomingMaster

void onManagementBecomingMaster()
Invoked by 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.
deprecated:
since 0.4.0 override EntityManagementSupport.onManagementStarting if customization needed


onManagementNoLongerMaster

void onManagementNoLongerMaster()
Invoked by 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.
deprecated:
since 0.4.0 override EntityManagementSupport.onManagementStopping if customization needed


onManagementStarted

void onManagementStarted()
Invoked by EntityManagementSupport when this entity is fully managed and visible to other entities through the management context.


onManagementStarting

void onManagementStarting()
Invoked by EntityManagementSupport when this entity is becoming managed (i.e. it has a working management context, but before the entity is visible to other entities).


refreshInheritedConfig

void refreshInheritedConfig()


refreshInheritedConfigOfChildren

void refreshInheritedConfigOfChildren()


removeAllEnrichers

@Override
boolean removeAllEnrichers()


removeAllPolicies

@Override
boolean removeAllPolicies()


removeAttribute

@Override
void removeAttribute(AttributeSensor attribute)


removeChild

@Override
boolean removeChild(Entity child)


removeEnricher

@Override
boolean removeEnricher(Enricher enricher)


removeLocations

@Override
void removeLocations(java.util.Collection newLocations)


removeOwnedChild

@Override
@Deprecated // see removeChild(Entity)
boolean removeOwnedChild(Entity child)


removePolicy

@Override
boolean removePolicy(Policy policy)


setApplication

protected void setApplication(Application app)
deprecated:
since 0.4.0 should not be needed / leaked outwith brooklyn internals / mgmt support?


setAttribute

@Override
java.lang.Object setAttribute(AttributeSensor attribute, java.lang.Object val)


setAttribute

java.lang.Object setAttribute(AttributeSensorAndConfigKey configuredSensor)
sets the value of the given attribute sensor from the config key value herein, if the config key resolves to a non-null value as a sensor

returns old value


setAttributeWithoutPublishing

@Override
java.lang.Object setAttributeWithoutPublishing(AttributeSensor attribute, java.lang.Object val)


setBeingManaged

void setBeingManaged()
deprecated:
since 0.4.0 now handled by EntityMangementSupport


setConfig

@Override
java.lang.Object setConfig(ConfigKey key, java.lang.Object val)


setConfig

java.lang.Object setConfig(ConfigKey key, Task val)


setConfig

java.lang.Object setConfig(ConfigKey key, DeferredSupplier val)


setConfig

@Override
java.lang.Object setConfig(HasConfigKey key, java.lang.Object val)


setConfig

java.lang.Object setConfig(HasConfigKey key, Task val)


setConfig

java.lang.Object setConfig(HasConfigKey key, DeferredSupplier val)


setConfigEvenIfOwned

java.lang.Object setConfigEvenIfOwned(ConfigKey key, java.lang.Object val)


setConfigEvenIfOwned

java.lang.Object setConfigEvenIfOwned(HasConfigKey key, java.lang.Object val)


setConfigIfValNonNull

protected void setConfigIfValNonNull(ConfigKey key, java.lang.Object val)


setConfigIfValNonNull

protected void setConfigIfValNonNull(HasConfigKey key, java.lang.Object val)


setDisplayName

void setDisplayName(java.lang.String newDisplayName)


setManagementContext

void setManagementContext(ManagementContextInternal managementContext)


setOwner

@Override
@Deprecated // see setParent(Entity)
AbstractEntity setOwner(Entity entity)


setParent

@Override
AbstractEntity setParent(Entity entity)
Adds this as a child of the given entity; registers with application if necessary.


setProxy

void setProxy(Entity proxy)


subscribe

SubscriptionHandle subscribe(Entity producer, Sensor sensor, SensorEventListener listener)
See Also:
EntityLocal#subscribe#subscribe


subscribeToChildren

SubscriptionHandle subscribeToChildren(Entity parent, Sensor sensor, SensorEventListener listener)
See Also:
EntityLocal#subscribeToChildren#subscribeToChildren


subscribeToMembers

SubscriptionHandle subscribeToMembers(Group group, Sensor sensor, SensorEventListener listener)
See Also:
EntityLocal#subscribeToMembers#subscribeToMembers


toString

@Override
java.lang.String toString()
Default String representation is simplified name of class, together with selected fields.


toStringFieldsToInclude

@Deprecated
java.util.Collection toStringFieldsToInclude()
override this, adding to the collection, to supply fields whose value, if not null, should be included in the toString
deprecated:
In 0.5.0, instead override toStringHelper instead


toStringHelper

protected ToStringHelper toStringHelper()
Override this to add to the toString(), e.g. return super.toStringHelper().add("port", port); Cannot be used in combination with overriding the deprecated toStringFieldsToInclude.


unsubscribe

@Override
boolean unsubscribe(Entity producer)
Unsubscribes the given producer.
See Also:
SubscriptionContext#unsubscribe(SubscriptionHandle)#unsubscribe(SubscriptionHandle)


unsubscribe

@Override
boolean unsubscribe(Entity producer, SubscriptionHandle handle)
Unsubscribes the given handle.
See Also:
SubscriptionContext#unsubscribe(SubscriptionHandle)#unsubscribe(SubscriptionHandle)


 

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