Class Binding

java.lang.Object
org.praxislive.base.Binding

public abstract class Binding extends Object
A BindingContext will normally have one Binding for each bound address. The Binding may have more than one BindingAdaptor attached to it.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Abstract type for binding to a Control.
    static final class 
    An adaptor implementation for syncing to properties, as defined by ControlInfo.Type.Property or ControlInfo.Type.ReadOnlyProperty.
    static enum 
    Rates for perdiodic syncing.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Method for Binding implementations to connect to an adaptor.
    abstract Optional<org.praxislive.core.ControlInfo>
    Get the ControlInfo of the bound Control, if available.
    abstract List<org.praxislive.core.Value>
    Get the most recent synced values, if the Control is a property.
    protected abstract void
    send(Binding.Adaptor adaptor, List<org.praxislive.core.Value> args)
    Method called by adaptors to send a call to the bound control.
    protected void
    Method for Binding implementations to disconnect from an adaptor.
    protected abstract void
    Method called by adaptors on configuration changes such as activity or sync rate to allow bindings to recalculate their configuration.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Binding

      public Binding()
  • Method Details

    • getControlInfo

      public abstract Optional<org.praxislive.core.ControlInfo> getControlInfo()
      Get the ControlInfo of the bound Control, if available.
      Returns:
      Optional of ControlInfo
    • getValues

      public abstract List<org.praxislive.core.Value> getValues()
      Get the most recent synced values, if the Control is a property.
      Returns:
      synced values
    • send

      protected abstract void send(Binding.Adaptor adaptor, List<org.praxislive.core.Value> args)
      Method called by adaptors to send a call to the bound control.
      Parameters:
      adaptor - sending adaptor
      args - argument list
    • updateAdaptorConfiguration

      protected abstract void updateAdaptorConfiguration(Binding.Adaptor adaptor)
      Method called by adaptors on configuration changes such as activity or sync rate to allow bindings to recalculate their configuration.
      Parameters:
      adaptor - changed adaptor
    • bind

      protected void bind(Binding.Adaptor adaptor)
      Method for Binding implementations to connect to an adaptor.
      Parameters:
      adaptor - adaptor to connect
    • unbind

      protected void unbind(Binding.Adaptor adaptor)
      Method for Binding implementations to disconnect from an adaptor.
      Parameters:
      adaptor - adaptor to disconnect