Interface Callback


public interface Callback
Handle result of a Call into the PraxisCORE system.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A callback result.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Callback
    create(CompletableFuture<List<org.praxislive.core.Value>> future)
    Create a callback that completes the provided CompletableFuture.
    static Callback
    Create a callback that delegates to the provided result consumer.
    void
    onError(List<org.praxislive.core.Value> args)
    Handle call error arguments.
    void
    onReturn(List<org.praxislive.core.Value> args)
    Handle call return arguments.
  • Method Details

    • onReturn

      void onReturn(List<org.praxislive.core.Value> args)
      Handle call return arguments.
      Parameters:
      args - call arguments
    • onError

      void onError(List<org.praxislive.core.Value> args)
      Handle call error arguments.
      Parameters:
      args - call arguments
    • create

      static Callback create(Consumer<Callback.Result> callback)
      Create a callback that delegates to the provided result consumer.
      Parameters:
      callback - result consumer
      Returns:
      new callback
    • create

      static Callback create(CompletableFuture<List<org.praxislive.core.Value>> future)
      Create a callback that completes the provided CompletableFuture.
      Parameters:
      future - completable future
      Returns:
      new callback