Class BindingContextControl

java.lang.Object
org.praxislive.base.BindingContextControl
All Implemented Interfaces:
BindingContext, Control

public class BindingContextControl extends Object implements Control, BindingContext
An implementation of BindingContext based around a single Control. A container just needs to provide an instance as a (hidden) control, and make it available via Lookup.
  • Constructor Details

    • BindingContextControl

      public BindingContextControl(ControlAddress controlAddress, ExecutionContext context, PacketRouter router)
      Create a BindingContextControl.
      Parameters:
      controlAddress - address of the control for sending and receiving all messages
      context - the execution context (required for sync clock)
      router - the router for sending all messages
  • Method Details

    • bind

      public void bind(ControlAddress address, Binding.Adaptor adaptor)
      Description copied from interface: BindingContext
      Bind adaptor to the binding for the given ControlAddress. An adaptor may only be bound to one address at a time.
      Specified by:
      bind in interface BindingContext
      Parameters:
      address - control to bind to
      adaptor - to send / receive values
    • unbind

      public void unbind(ControlAddress address, Binding.Adaptor adaptor)
      Description copied from interface: BindingContext
      Unbind adaptor from its binding. If the adaptor is not bound to this address, the method will do nothing.
      Specified by:
      unbind in interface BindingContext
      Parameters:
      address - bound control address
      adaptor - to remove
    • call

      public void call(Call call, PacketRouter router) throws Exception
      Specified by:
      call in interface Control
      Throws:
      Exception