Package org.mozilla.javascript
Class ContinuationPending
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.mozilla.javascript.ContinuationPending
-
- All Implemented Interfaces:
Serializable
public class ContinuationPending extends RuntimeException
Exception thrown byContext.executeScriptWithContinuations(Script, Scriptable)
andContext.callFunctionWithContinuations(Callable, Scriptable, Object[])
when execution encounters a continuation captured byContext.captureContinuation()
. Exception will contain the captured state needed to restart the continuation withContext.resumeContinuation(Object, Scriptable, Object)
.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getApplicationState()
Object
getContinuation()
Get continuation object.void
setApplicationState(Object applicationState)
Store an arbitrary object that applications can use to associate their state with the continuation.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
getContinuation
public Object getContinuation()
Get continuation object. The only use for this object is to be passed toContext.resumeContinuation(Object, Scriptable, Object)
.- Returns:
- 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
-
-