|
Brooklyn | |||||||
FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.policy.basic.AbstractEntityAdjunct
public abstract class AbstractEntityAdjunct
Common functionality for policies and enrichers
Field Summary | |
---|---|
protected SubscriptionTracker |
_subscriptionTracker
not for direct access; refer to as 'subscriptionTracker' via getter so that it is initialized |
protected EntityLocal |
entity
|
protected java.lang.String |
id
|
protected java.lang.String |
name
|
Method Summary | |
---|---|
protected boolean
|
check(Entity producer)
returns false if deleted, throws exception if invalid state, otherwise true |
void
|
destroy()
Unsubscribes and clears all managed subscriptions; is called by the owning entity when a policy is removed and should always be called by any subclasses overriding this method |
protected java.util.Collection
|
getAllSubscriptions()
@return a list of all subscription handles |
java.lang.String
|
getId()
|
protected ManagementContext
|
getManagementContext()
|
java.lang.String
|
getName()
|
protected SubscriptionTracker
|
getSubscriptionTracker()
|
boolean
|
isDestroyed()
|
boolean
|
isRunning()
|
void
|
setEntity(EntityLocal entity)
|
void
|
setId(java.lang.String id)
|
void
|
setName(java.lang.String name)
|
protected SubscriptionHandle
|
subscribe(Entity producer, Sensor sensor, SensorEventListener listener)
@see SubscriptionContext#subscribe(Entity, Sensor, SensorEventListener) |
protected SubscriptionHandle
|
subscribeToChildren(Entity producerParent, Sensor sensor, SensorEventListener listener)
@see SubscriptionContext#subscribe(Entity, Sensor, SensorEventListener) |
protected SubscriptionHandle
|
subscribeToMembers(Group producerGroup, Sensor sensor, SensorEventListener listener)
@see SubscriptionContext#subscribe(Entity, Sensor, SensorEventListener) |
protected boolean
|
unsubscribe(Entity producer)
Unsubscribes the given producer. |
protected boolean
|
unsubscribe(Entity producer, SubscriptionHandle handle)
Unsubscribes the given producer. |
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 |
---|
protected SubscriptionTracker _subscriptionTracker
protected EntityLocal entity
@SetFromFlag protected java.lang.String id
@SetFromFlag protected java.lang.String name
Method Detail |
---|
protected boolean check(Entity producer)
public void destroy()
protected java.util.Collection getAllSubscriptions()
public java.lang.String getId()
protected ManagementContext getManagementContext()
public java.lang.String getName()
protected SubscriptionTracker getSubscriptionTracker()
@Override public boolean isDestroyed()
@Override public boolean isRunning()
public void setEntity(EntityLocal entity)
public void setId(java.lang.String id)
public void setName(java.lang.String name)
protected SubscriptionHandle subscribe(Entity producer, Sensor sensor, SensorEventListener listener)
protected SubscriptionHandle subscribeToChildren(Entity producerParent, Sensor sensor, SensorEventListener listener)
protected SubscriptionHandle subscribeToMembers(Group producerGroup, Sensor sensor, SensorEventListener listener)
protected boolean unsubscribe(Entity producer)
protected boolean unsubscribe(Entity producer, SubscriptionHandle handle)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.