Brooklyn

brooklyn.event.feed
[Java] Class FeedConfig

java.lang.Object
  brooklyn.event.feed.FeedConfig

public class FeedConfig

Configuration for a poll, or a subscription etc, that is being added to a feed.

Authors:
aled


Field Summary
static java.lang.Object UNSET

The onSuccess or onError functions can return this value to indicate that the sensor should not change.

 
Constructor Summary
FeedConfig(AttributeSensor sensor)

FeedConfig(FeedConfig other)

 
Method Summary
This checkSuccess(Predicate val)

sets the predicate used to check whether a feed run is successful

Predicate getCheckSuccess()

Function getOnError()

@deprecated since 0.6; use getOnException())

Function getOnException()

Function getOnFailure()

Function getOnSuccess()

AttributeSensor getSensor()

boolean hasCheckSuccessHandler()

boolean hasExceptionHandler()

boolean hasFailureHandler()

boolean hasSuccessHandler()

This onError(Function val)

@deprecated since 0.6; use onException(Function)

This onException(Function val)

an exception is when there is an error in the communication

This onFailure(Function val)

a failure is when the connection is fine (no exception) but the other end returns a result object V which the feed can tell indicates a failure (e.g.

This onFailureOrException(Function val)

convenience for indicating a behaviour to occur for both onException(Function) (error connecting) and onFailure(Function) (successful communication but failure report from remote end)

This onResult(Function val)

registers a callback to be used onSuccess(Function) and onFailure(Function), i.e. whenever a result comes back, but not in case of exceptions being thrown (ie problems communicating)

This onSuccess(Function val)

protected This self()

This setOnException(java.lang.Object val)

This setOnFailure(java.lang.Object val)

This setOnFailureOrException(java.lang.Object val)

This setOnResult(java.lang.Object val)

This setOnSuccess(java.lang.Object val)

 
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

UNSET

public static final java.lang.Object UNSET
The onSuccess or onError functions can return this value to indicate that the sensor should not change.


 
Constructor Detail

FeedConfig

public FeedConfig(AttributeSensor sensor)


FeedConfig

public FeedConfig(FeedConfig other)


 
Method Detail

checkSuccess

public This checkSuccess(Predicate val)
sets the predicate used to check whether a feed run is successful


getCheckSuccess

public Predicate getCheckSuccess()


getOnError

public Function getOnError()
deprecated:
since 0.6; use getOnException())


getOnException

public Function getOnException()


getOnFailure

public Function getOnFailure()


getOnSuccess

public Function getOnSuccess()


getSensor

public AttributeSensor getSensor()


hasCheckSuccessHandler

public boolean hasCheckSuccessHandler()


hasExceptionHandler

public boolean hasExceptionHandler()


hasFailureHandler

public boolean hasFailureHandler()


hasSuccessHandler

public boolean hasSuccessHandler()


onError

public This onError(Function val)
deprecated:
since 0.6; use onException(Function)


onException

public This onException(Function val)
an exception is when there is an error in the communication


onFailure

public This onFailure(Function val)
a failure is when the connection is fine (no exception) but the other end returns a result object V which the feed can tell indicates a failure (e.g. HTTP code 404)


onFailureOrException

public This onFailureOrException(Function val)
convenience for indicating a behaviour to occur for both onException(Function) (error connecting) and onFailure(Function) (successful communication but failure report from remote end)


onResult

public This onResult(Function val)
registers a callback to be used onSuccess(Function) and onFailure(Function), i.e. whenever a result comes back, but not in case of exceptions being thrown (ie problems communicating)


onSuccess

public This onSuccess(Function val)


self

@SuppressWarnings("unchecked")
protected This self()


setOnException

public This setOnException(java.lang.Object val)


setOnFailure

public This setOnFailure(java.lang.Object val)


setOnFailureOrException

public This setOnFailureOrException(java.lang.Object val)


setOnResult

public This setOnResult(java.lang.Object val)


setOnSuccess

public This setOnSuccess(java.lang.Object val)


 

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