public interface BindingProvider<T>
BindingProcessor by providing available bindings and then reacting to their executions.| Modifier and Type | Method and Description |
|---|---|
void |
addReferenceListener(Reference ref,
ReferenceListener<T> listener)
Method called by the binding processor once the provider should start listening for certain
Reference changes. |
java.util.Map<Binding,EvaluationOptions> |
createBindings()
Returns bindings provided by the Provider.
|
java.util.List<Reference> |
getReferences(Binding binding)
Returns list of references of a particular binding.
|
void |
processError(Binding binding,
int method,
Reference cause,
java.lang.Exception error)
Method used to handle binding processing error.
|
void |
processExecution(int event,
Binding binding,
EvaluationOptions options,
Reference cause,
java.lang.Object result)
Method used to handle execution of a binding.
|
void |
removeReferenceListener(ReferenceListener<T> listener)
Method called by the binding processor once the provider should no longer listen for changes of a
Reference. |
void |
start()
Method called by
BindingProcessor upon its startup. |
void |
stop()
Method called by
BindingProcessor upon its termination. |
void |
writeReference(int method,
Binding binding,
Reference cause,
java.lang.Object value,
ChangeCache cache,
Pinpoint pinpoint)
Method is called once a binding was executed, its expression evaluated to some result and the provider needs to
write the result into binding target.
|
java.util.Map<Binding,EvaluationOptions> createBindings()
EvaluationOptionsvoid start()
BindingProcessor upon its startup. Should implement initialization logic.void stop()
BindingProcessor upon its termination. Should implement cleanup logic.java.util.List<Reference> getReferences(Binding binding) throws BindingException
BindingExceptionvoid writeReference(int method,
Binding binding,
Reference cause,
java.lang.Object value,
@Nullable
ChangeCache cache,
@Nullable
Pinpoint pinpoint)
throws BindingException
method - Binding execution method: EvaluationOptions.STARTUP, EvaluationOptions.EVENT or EvaluationOptions.PERIODICbinding - The Binding itselfcause - Execution causevalue - Value to write to the targetcache - Change cachepinpoint - Origin of the writingBindingException - if writing was not successfulvoid addReferenceListener(Reference ref, ReferenceListener<T> listener) throws BindingException
Reference changes.ref - Reference to listenlistener - Listener that should be called if the reference was changedBindingException - If a listening could not be startedvoid removeReferenceListener(ReferenceListener<T> listener)
Reference.listener - Listener to removevoid processExecution(int event,
Binding binding,
EvaluationOptions options,
Reference cause,
java.lang.Object result)