Class HttpBinding
java.lang.Object
com.inductiveautomation.perspective.gateway.binding.AbstractPollingBinding<HttpUriRequestBuilder>
com.inductiveautomation.perspective.gateway.binding.http.HttpBinding
- All Implemented Interfaces:
HttpBindingConstants,Binding
public class HttpBinding
extends AbstractPollingBinding<HttpUriRequestBuilder>
implements Binding, HttpBindingConstants
Implementation of the Perspective HTTP Binding.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.perspective.gateway.binding.AbstractPollingBinding
AbstractPollingBinding.State -
Field Summary
Fields inherited from class com.inductiveautomation.perspective.gateway.binding.AbstractPollingBinding
context, stateFields inherited from interface com.inductiveautomation.perspective.gateway.api.Binding
BAD_CONFIG, BAD_REF, BIDIRECTIONAL_KEY, COALESCE_KEY, INITIAL_VALUE, MDC_BINDING_TARGET, NOT_FOUNDFields inherited from interface com.inductiveautomation.perspective.common.config.constants.HttpBindingConstants
TYPE_ID -
Constructor Summary
ConstructorsConstructorDescriptionHttpBinding(BindingContext bindingContext, HttpBindingConfig bindingConfig, PerspectiveExpressionFactory exprFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected HttpUriRequestBuilderThis method will be called when it is time to fetch a new value.protected booleanisDirty()If any dependencies of the implementation have changed, this method should return true, which will kick off another execution if dependencies have changed while the execution was running.protected booleanisReady()Indicates whether or not the instance of the underlying implementation is ready for execution.voidshutdown()Shut down the binding.voidstartup()Start up the binding.Methods inherited from class com.inductiveautomation.perspective.gateway.binding.AbstractPollingBinding
onUserRefresh, scheduleNowMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.inductiveautomation.perspective.gateway.api.Binding
isBidirectional, onTargetUpdated, onUserRefresh, shouldCoalesce
-
Constructor Details
-
HttpBinding
public HttpBinding(@Nonnull BindingContext bindingContext, @Nonnull HttpBindingConfig bindingConfig, @Nonnull PerspectiveExpressionFactory exprFactory) throws ConfigurationException - Throws:
ConfigurationException
-
-
Method Details
-
isReady
protected boolean isReady()Description copied from class:AbstractPollingBindingIndicates whether or not the instance of the underlying implementation is ready for execution.- Specified by:
isReadyin classAbstractPollingBinding<HttpUriRequestBuilder>
-
isDirty
protected boolean isDirty()Description copied from class:AbstractPollingBindingIf any dependencies of the implementation have changed, this method should return true, which will kick off another execution if dependencies have changed while the execution was running.- Specified by:
isDirtyin classAbstractPollingBinding<HttpUriRequestBuilder>
-
buildFetchParameters
Description copied from class:AbstractPollingBindingThis method will be called when it is time to fetch a new value. The parameter object must implement hashcode and equals, and must contain everything needed to run this parameter's fetch function. The parameter object will be given to theValueCache, which will then execute the fetch function if a new value is needed. This method will be called within a synchronized block holding this lock.- Specified by:
buildFetchParametersin classAbstractPollingBinding<HttpUriRequestBuilder>
-
resolveReferences
- Specified by:
resolveReferencesin interfaceBinding- Overrides:
resolveReferencesin classAbstractPollingBinding<HttpUriRequestBuilder>
-
startup
public void startup()Description copied from interface:BindingStart up the binding. Will be called on-queue- Specified by:
startupin interfaceBinding- Overrides:
startupin classAbstractPollingBinding<HttpUriRequestBuilder>
-
shutdown
public void shutdown()Description copied from interface:BindingShut down the binding. Will be called on-queue- Specified by:
shutdownin interfaceBinding- Overrides:
shutdownin classAbstractPollingBinding<HttpUriRequestBuilder>
-