|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.event.feed.AttributePollHandler
public class AttributePollHandler
Handler for when polling an entity's attribute. On each poll result the entity's attribute is set. Calls to onSuccess and onError will happen sequentially, but may be called from different threads each time. Note that no guarantees of a synchronized block exist, so additional synchronization would be required for the Java memory model's "happens before" relationship.
Field Summary | |
---|---|
static Logger |
log
|
Constructor Summary | |
AttributePollHandler(FeedConfig config, EntityLocal entity, AbstractFeed feed)
|
Method Summary | |
---|---|
protected boolean
|
hasErrorHandler()
|
void
|
onError(java.lang.Exception error)
|
void
|
onSuccess(java.lang.Object val)
|
protected java.lang.Object
|
transformError(java.lang.Exception error)
Does post-processing on a poll error, to convert it to the attribute's new value. |
protected java.lang.Object
|
transformValue(java.lang.Object val)
Does post-processing on the result of the actual poll, to convert it to the attribute's new value. |
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 |
---|
public static final Logger log
Constructor Detail |
---|
public AttributePollHandler(FeedConfig config, EntityLocal entity, AbstractFeed feed)
Method Detail |
---|
protected boolean hasErrorHandler()
@Override public void onError(java.lang.Exception error)
@Override public void onSuccess(java.lang.Object val)
protected java.lang.Object transformError(java.lang.Exception error)
protected java.lang.Object transformValue(java.lang.Object val)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.