Brooklyn

brooklyn.entity.effector
[Java] Class EffectorBody

java.lang.Object
  brooklyn.entity.effector.EffectorBody

@Beta
public abstract class EffectorBody

Typical implementations override main(ConfigBag) to do the work of the effector

See also EffectorTasks: possibly this will be deleted in preference for an approach based on EffectorTasks.

Since:
0.6.0


Method Summary
java.lang.Object call(ConfigBag parameters)

Does the work of the effector, either in place, or (better) by building up subtasks, which can by added using DynamicTasks methods (and various convenience methods which do that automatically; see subclasses of EffectorBody for more info on usage; or see DynamicSequentialTask for details of the threading model by which added tasks are placed in a secondary thread)

protected EntityInternal entity()

protected Task last()

Returns the last task queued in this context, or null if none.

protected java.lang.Object last(java.lang.Class type)

Returns the result of the last task queued in this context, coerced to the given type

protected java.lang.Object queue(java.lang.Object task)

protected void queue(java.lang.Object task1, java.lang.Object task2, java.lang.Object... tasks)

protected void queue(java.lang.Object task1, java.lang.Object task2, java.lang.Object... tasks)

protected java.lang.Object queue(TaskFactory task)

protected Task waitForLast()

see DynamicTasks#waitForLast()#waitForLast()

 
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

call

public java.lang.Object call(ConfigBag parameters)
Does the work of the effector, either in place, or (better) by building up subtasks, which can by added using DynamicTasks methods (and various convenience methods which do that automatically; see subclasses of EffectorBody for more info on usage; or see DynamicSequentialTask for details of the threading model by which added tasks are placed in a secondary thread)

The associated entity can be accessed through the entity() method.


entity

protected EntityInternal entity()


last

protected Task last()
Returns the last task queued in this context, or null if none. Does not wait, and no guarantee the task is submitted.


last

protected java.lang.Object last(java.lang.Class type)
Returns the result of the last task queued in this context, coerced to the given type


queue

protected java.lang.Object queue(java.lang.Object task)


queue

protected void queue(java.lang.Object task1, java.lang.Object task2, java.lang.Object... tasks)


queue

protected void queue(java.lang.Object task1, java.lang.Object task2, java.lang.Object... tasks)


queue

protected java.lang.Object queue(TaskFactory task)


waitForLast

protected Task waitForLast()
see DynamicTasks#waitForLast()#waitForLast()


 

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