Class ContinuationPending

All Implemented Interfaces:
Serializable

public class ContinuationPending extends RuntimeException
Exception thrown by Context.executeScriptWithContinuations(Script, Scriptable) and Context.callFunctionWithContinuations(Callable, Scriptable, Object[]) when execution encounters a continuation captured by Context.captureContinuation(). Exception will contain the captured state needed to restart the continuation with Context.resumeContinuation(Object, Scriptable, Object).
Author:
Norris Boyd
See Also:
  • Constructor Details

  • Method Details

    • getContinuation

      public Object getContinuation()
      Get continuation object. The only use for this object is to be passed to Context.resumeContinuation(Object, Scriptable, Object).
      Returns:
      continuation object
    • setContinuation

      public void setContinuation(NativeContinuation continuation)
      Set continuation object. Allows subclasses to modify the internal state.
      Parameters:
      continuation - object
    • setApplicationState

      public void setApplicationState(Object applicationState)
      Store an arbitrary object that applications can use to associate their state with the continuation.
      Parameters:
      applicationState - arbitrary application state
    • getApplicationState

      public Object getApplicationState()
      Returns:
      arbitrary application state