public class V8ValuePromise extends V8ValueObject implements IV8ValuePromise
IV8ValuePromise.IListener
ERROR_THE_KEY_VALUE_PAIR_MUST_MATCH, FUNCTION_ADD, FUNCTION_DELETE, FUNCTION_GET, FUNCTION_HAS, FUNCTION_SET, METHOD_PREFIX_GET, METHOD_PREFIX_IS, METHOD_PREFIX_SET, PROPERTY_PROTOTYPE
handle, INVALID_HANDLE, weak
OBJECT_CONVERTER, v8Runtime
STATE_FULFILLED, STATE_PENDING, STATE_REJECTED
DEFAULT_BATCH_SIZE, MIN_BATCH_SIZE
Modifier and Type | Method and Description |
---|---|
V8ValuePromise |
_catch(IV8ValueFunction functionCatch)
Catch.
|
V8ValuePromise |
getPromise()
Gets promise.
|
<Value extends V8Value> |
getResult()
Gets result.
|
int |
getState()
Gets state.
|
V8ValueReferenceType |
getType() |
boolean |
hasHandler()
Has handler.
|
void |
markAsHandled()
Mark as handled.
|
boolean |
register(IV8ValuePromise.IListener listener)
Register a listener which receives the promise resolve, reject or catch event.
|
boolean |
reject(V8Value v8Value)
Reject.
|
boolean |
resolve(V8Value v8Value)
Resolve.
|
V8ValuePromise |
then(IV8ValueFunction functionFulfilled,
IV8ValueFunction functionRejected)
Then.
|
batchGet, bind, bindFunction, bindProperty, delete, deletePrivateProperty, forEach, forEach, get, getBoolean, getDouble, getIdentityHash, getInteger, getLong, getOwnPropertyNames, getPrivateProperty, getProperty, getPropertyNames, getPrototype, getString, has, hasInternalType, hasOwnProperty, hasPrivateProperty, invokeExtended, invokeExtended, sameValue, set, set, setBoolean, setDouble, setInteger, setLong, setNull, setPrivateProperty, setProperty, setPrototype, setString, setUndefined, strictEquals, toJsonString, toProtoString, unbind, unbindFunction, unbindProperty, unbindProperty, unbindProperty, unbindProperty
addReference, checkV8Runtime, clearWeak, close, close, equals, getHandle, isClosed, isWeak, isWeak, removeReference, setWeak, toClone, toString
getV8Runtime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
_catch, getResultBigInteger, getResultBoolean, getResultDouble, getResultInteger, getResultLong, getResultObject, getResultPrimitive, getResultString, getResultZonedDateTime, isFulfilled, isPending, isRejected, reject, resolve, then, then, then
batchGet, bind, bindFunction, bindFunction, bindFunction, bindProperty, bindProperty, delete, deleteNull, deletePrivateProperty, deleteUndefined, forEach, forEach, forEach, forEach, forEach, forEach, forEach, forEach, get, getBigInteger, getBoolean, getDouble, getFloat, getIdentityHash, getInteger, getLong, getNull, getObject, getOwnPropertyNames, getOwnPropertyNameStrings, getPrivateProperty, getPrivatePropertyBoolean, getPrivatePropertyDouble, getPrivatePropertyFloat, getPrivatePropertyInteger, getPrivatePropertyLong, getPrivatePropertyNull, getPrivatePropertyObject, getPrivatePropertyPrimitive, getPrivatePropertyString, getPrivatePropertyUndefined, getPrivatePropertyZonedDateTime, getProperty, getPropertyBoolean, getPropertyDouble, getPropertyFloat, getPropertyInteger, getPropertyLong, getPropertyNames, getPropertyObject, getPropertyPrimitive, getPropertyString, getPropertyZonedDateTime, getPrototype, getString, getUndefined, getZonedDateTime, has, hasInternalType, hasNull, hasOwnProperty, hasPrivateProperty, hasUndefined, invoke, invoke, invokeBigInteger, invokeBoolean, invokeDouble, invokeExtended, invokeExtended, invokeFloat, invokeInteger, invokeLong, invokeObject, invokeString, invokeVoid, invokeVoid, invokeZonedDateTime, isGeneratorObject, set, set, setBoolean, setDouble, setInteger, setLong, setNull, setPrivateProperty, setPrivatePropertyNull, setPrivatePropertyUndefined, setProperty, setPropertyNull, setPropertyUndefined, setPrototype, setString, setUndefined, toJsonString, toProtoString, unbind, unbindFunction, unbindFunction, unbindFunction, unbindProperty, unbindProperty, unbindProperty, unbindProperty
clearWeak, close, getHandle, isClosed, isWeak, isWeak, setWeak
asBoolean, asDouble, asInt, asLong, asString, equals, getV8Runtime, isNull, isNullOrUndefined, isUndefined, sameValue, strictEquals
close
toClone, toClone
@CheckReturnValue public V8ValuePromise _catch(IV8ValueFunction functionCatch) throws JavetException
IV8ValuePromise
_catch
in interface IV8ValuePromise
functionCatch
- the function catchJavetException
- the javet exceptionpublic V8ValuePromise getPromise() throws JavetException
IV8ValuePromise
getPromise
in interface IV8ValuePromise
JavetException
- the javet exception@CheckReturnValue public <Value extends V8Value> Value getResult() throws JavetException
IV8ValuePromise
getResult
in interface IV8ValuePromise
Value
- the type parameterJavetException
- the javet exceptionpublic int getState() throws JavetException
IV8ValuePromise
getState
in interface IV8ValuePromise
JavetException
- the javet exceptionpublic V8ValueReferenceType getType()
getType
in interface IV8ValueReference
getType
in class V8ValueObject
public boolean hasHandler() throws JavetException
IV8ValuePromise
hasHandler
in interface IV8ValuePromise
JavetException
- the javet exceptionpublic void markAsHandled() throws JavetException
IV8ValuePromise
markAsHandled
in interface IV8ValuePromise
JavetException
- the javet exceptionpublic boolean register(IV8ValuePromise.IListener listener) throws JavetException
IV8ValuePromise
register
in interface IV8ValuePromise
listener
- the listenerJavetException
- the javet exceptionpublic boolean reject(V8Value v8Value) throws JavetException
IV8ValuePromise
reject
in interface IV8ValuePromise
v8Value
- the V8 valueJavetException
- the javet exceptionpublic boolean resolve(V8Value v8Value) throws JavetException
IV8ValuePromise
resolve
in interface IV8ValuePromise
v8Value
- the V8 valueJavetException
- the javet exception@CheckReturnValue public V8ValuePromise then(IV8ValueFunction functionFulfilled, IV8ValueFunction functionRejected) throws JavetException
IV8ValuePromise
then
in interface IV8ValuePromise
functionFulfilled
- the function fulfilledfunctionRejected
- the function rejectedJavetException
- the javet exception