Class Binding.Adaptor

java.lang.Object
org.praxislive.base.Binding.Adaptor
Enclosing class:
Binding

public abstract static class Binding.Adaptor extends Object
Abstract type for binding to a Control.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final Binding
    Get the Binding this adaptor is attached to.
    The current SyncRate.
    protected boolean
    Whether the Adaptor is currently actively updating and sending values, eg. as a response to user input.
    final boolean
    Whether this Adaptor is currently active.
    protected void
    onError(List<org.praxislive.core.Value> args)
    An optional hook for adaptors to access any error response from a call to send.
    protected void
    onResponse(List<org.praxislive.core.Value> args)
    An optional hook for adaptors to access the returned response from a call to send.
    protected final void
    send(List<org.praxislive.core.Value> args)
    Send the provided values to the Control.
    final void
    setActive(boolean active)
    Set whether this Adaptor is currently active.
    final void
    Set the SyncRate of the Adaptor.
    protected void
    Optional hook called whenever values have been updated, by a sync call or another Adaptor.
    protected void
    Optional hook called when the Binding configuration has changed.

    Methods inherited from class java.lang.Object

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

    • Adaptor

      public Adaptor()
  • Method Details

    • getBinding

      public final Binding getBinding()
      Get the Binding this adaptor is attached to. The binding provides access to latest values and the ControlInfo.
      Returns:
      binding
    • getSyncRate

      public final Binding.SyncRate getSyncRate()
      The current SyncRate.
      Returns:
      syncrate
    • isActive

      public final boolean isActive()
      Whether this Adaptor is currently active.
      Returns:
      active
    • setActive

      public final void setActive(boolean active)
      Set whether this Adaptor is currently active. By default an Adaptor is inactive. The Binding will not sync unless at least one attached Adaptor is active and has a sync rate above None.
      Parameters:
      active -
    • setSyncRate

      public final void setSyncRate(Binding.SyncRate syncRate)
      Set the SyncRate of the Adaptor. By default an Adaptor has a sync rate of None. The Binding will not sync unless at least one attached Adaptor is active and has a sync rate above None. The highest active sync rate will be used by the binding.
      Parameters:
      syncRate -
    • send

      protected final void send(List<org.praxislive.core.Value> args)
      Send the provided values to the Control. Other attached Adaptors will be immediately updated.
      Parameters:
      args -
    • getValueIsAdjusting

      protected boolean getValueIsAdjusting()
      Whether the Adaptor is currently actively updating and sending values, eg. as a response to user input. The Binding implementation will normally send quiet calls in such cases as the values are expected to be superseded before a reply is received.
      Returns:
      value currently being adjuested
    • onResponse

      protected void onResponse(List<org.praxislive.core.Value> args)
      An optional hook for adaptors to access the returned response from a call to send. This will only be called on the adaptor that initiated the call.
      Parameters:
      args - returned values
    • onError

      protected void onError(List<org.praxislive.core.Value> args)
      An optional hook for adaptors to access any error response from a call to send. This will only be called on the adaptor that initiated the call.
      Parameters:
      args - error values
    • updateBindingConfiguration

      protected void updateBindingConfiguration()
      Optional hook called when the Binding configuration has changed. Eg. new ControlInfo available.
    • update

      protected void update()
      Optional hook called whenever values have been updated, by a sync call or another Adaptor.