Class InlineCommand.InlineStackFrame

java.lang.Object
org.praxislive.script.InlineCommand.InlineStackFrame
All Implemented Interfaces:
StackFrame
Enclosing interface:
InlineCommand

public static final class InlineCommand.InlineStackFrame extends Object implements StackFrame
A default implementation of StackFrame for use by InlineCommand implementations.
  • Method Details

    • getState

      public StackFrame.State getState()
      Description copied from interface: StackFrame
      Get the current state of this StackFrame.
      Specified by:
      getState in interface StackFrame
      Returns:
      current state
    • process

      public StackFrame process(Env env)
      Description copied from interface: StackFrame
      Process the StackFrame. After processing, the StackFrame should have made one or more Calls, returned a child StackFrame, or moved out of the Incomplete state.

      Process may be called multiple times if the state is still incomplete after this method returns and a response has been posted.

      Specified by:
      process in interface StackFrame
      Parameters:
      env - processing environment
      Returns:
      child StackFrame or null
    • postResponse

      public void postResponse(Call call)
      Description copied from interface: StackFrame
      Used by the script executor to post the result of a Call. The StackFrame should validate the match ID of the response call against any pending calls before processing the call state or arguments.

      If the state is still incomplete after a response is posted, StackFrame.process(org.praxislive.script.Env) will be called again.

      Specified by:
      postResponse in interface StackFrame
      Parameters:
      call - response call
    • postResponse

      public void postResponse(StackFrame.State state, List<Value> args)
      Description copied from interface: StackFrame
      Used by the script executor to post the result of a child StackFrame returned by StackFrame.process(org.praxislive.script.Env).

      If the state is still incomplete after a response is posted, StackFrame.process(org.praxislive.script.Env) will be called again.

      Specified by:
      postResponse in interface StackFrame
      Parameters:
      state - the completion state of the child stack frame
      args - the result of the child stack frame
    • result

      public List<Value> result()
      Description copied from interface: StackFrame
      Access the result of this StackFrame.
      Specified by:
      result in interface StackFrame
      Returns:
      result