Brooklyn

brooklyn.event.adapter
[Groovy] Class AbstractPollHelper

java.lang.Object
  brooklyn.event.adapter.AbstractPollHelper

abstract class AbstractPollHelper

captures common fields and processes for pollers that support sensor adapters


Field Summary
static Logger log

 
Property Summary
AbstractSensorAdapter adapter

boolean lastWasSuccessful

java.util.List polledListeners

java.util.Map polledSensors

ScheduledTask schedule

 
Constructor Summary
AbstractPollHelper(AbstractSensorAdapter adapter)

 
Method Summary
protected java.lang.Object activatePoll()

void addListener(groovy.lang.Closure c)

void addSensor(Sensor s, groovy.lang.Closure c)

protected java.lang.Object deactivatePoll()

java.lang.Object evaluateSensorOnResponse(Sensor s, groovy.lang.Closure c, AbstractSensorEvaluationContext response)

void evaluateSensorsOnResponse(AbstractSensorEvaluationContext response)

protected void executePoll()

implementation-specific generation of AbstractSensorEvaluationContext which is then typically passed to evaluateSensorsOnPollResponse

protected AbstractSensorEvaluationContext executePollOnError(java.lang.Exception e)

optional action to take if a poll has just failed; defaults to null

protected AbstractSensorEvaluationContext executePollOnSuccess()

method for implementations to supply to execute the poll call which drives the children

EntityLocal getEntity()

protected java.lang.String getOptionalContextForErrors(AbstractSensorEvaluationContext response)

returns additional context information for errors

protected boolean isEmpty()

java.lang.String toString()

 
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

public static final Logger log


 
Property Detail

adapter

AbstractSensorAdapter adapter


lastWasSuccessful

boolean lastWasSuccessful


polledListeners

final java.util.List polledListeners


polledSensors

final java.util.Map polledSensors


schedule

ScheduledTask schedule


 
Constructor Detail

AbstractPollHelper

AbstractPollHelper(AbstractSensorAdapter adapter)


 
Method Detail

activatePoll

protected java.lang.Object activatePoll()


addListener

void addListener(groovy.lang.Closure c)


addSensor

void addSensor(Sensor s, groovy.lang.Closure c)


deactivatePoll

protected java.lang.Object deactivatePoll()


evaluateSensorOnResponse

java.lang.Object evaluateSensorOnResponse(Sensor s, groovy.lang.Closure c, AbstractSensorEvaluationContext response)


evaluateSensorsOnResponse

void evaluateSensorsOnResponse(AbstractSensorEvaluationContext response)


executePoll

protected void executePoll()
implementation-specific generation of AbstractSensorEvaluationContext which is then typically passed to evaluateSensorsOnPollResponse


executePollOnError

protected AbstractSensorEvaluationContext executePollOnError(java.lang.Exception e)
optional action to take if a poll has just failed; defaults to null


executePollOnSuccess

protected AbstractSensorEvaluationContext executePollOnSuccess()
method for implementations to supply to execute the poll call which drives the children


getEntity

EntityLocal getEntity()


getOptionalContextForErrors

protected java.lang.String getOptionalContextForErrors(AbstractSensorEvaluationContext response)
returns additional context information for errors


isEmpty

protected boolean isEmpty()


toString

java.lang.String toString()


 

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