Package org.htmlunit.corejs.javascript
Class ContinuationPending
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.htmlunit.corejs.javascript.ContinuationPending
-
- All Implemented Interfaces:
java.io.Serializable
public class ContinuationPending extends java.lang.RuntimeExceptionException 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
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ObjectapplicationStateprivate NativeContinuationcontinuationStateprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description protectedContinuationPending(NativeContinuation continuationState)Construct a ContinuationPending exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetApplicationState()java.lang.ObjectgetContinuation()Get continuation object.(package private) NativeContinuationgetContinuationState()voidsetApplicationState(java.lang.Object applicationState)Store an arbitrary object that applications can use to associate their state with the continuation.voidsetContinuation(NativeContinuation continuation)Set continuation object.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
continuationState
private NativeContinuation continuationState
-
applicationState
private java.lang.Object applicationState
-
-
Constructor Detail
-
ContinuationPending
protected ContinuationPending(NativeContinuation continuationState)
Construct a ContinuationPending exception. Internal call only; users of the API should get continuations created on their behalf by callingContext.executeScriptWithContinuations(Script, Scriptable)andContext.callFunctionWithContinuations(Callable, Scriptable, Object[])Creating subclasses allowed.- Parameters:
continuationState- Internal Continuation object
-
-
Method Detail
-
getContinuation
public java.lang.Object getContinuation()
Get continuation object. The only use for this object is to be passed toContext.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
-
getContinuationState
NativeContinuation getContinuationState()
- Returns:
- internal continuation state
-
setApplicationState
public void setApplicationState(java.lang.Object applicationState)
Store an arbitrary object that applications can use to associate their state with the continuation.- Parameters:
applicationState- arbitrary application state
-
getApplicationState
public java.lang.Object getApplicationState()
- Returns:
- arbitrary application state
-
-