Package com.smartgwt.client.util
Class PromiseOutcome
java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.util.PromiseOutcome
- All Implemented Interfaces:
HasHandlers
Holds information about the outcome of a settled Promise.
Note: This is the type of object returned by Promise.allSettled().
-
Field Summary
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PromiseOutcome
getOrCreateRef
(JavaScriptObject jsObj) Only if thestatus
is REJECTED, the reason that thePromise
rejected with.The state that thePromise
settled into.getValue()
Only if thestatus
is FULFILLED, the value that thePromise
fulfilled with.Only if thestatus
is REJECTED, the reason that thePromise
rejected with.setStatus
(SettledPromiseStatus status) The state that thePromise
settled into.Only if thestatus
is FULFILLED, the value that thePromise
fulfilled with.Methods inherited from class com.smartgwt.client.core.DataClass
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
-
Constructor Details
-
PromiseOutcome
public PromiseOutcome() -
PromiseOutcome
-
-
Method Details
-
getOrCreateRef
-
setReason
Only if thestatus
is REJECTED, the reason that thePromise
rejected with.- Parameters:
reason
- New reason value. Default value is *initialized by the implementation*- Returns:
PromiseOutcome
instance, for chaining setter calls
-
getReason
Only if thestatus
is REJECTED, the reason that thePromise
rejected with.- Returns:
- Current reason value. Default value is *initialized by the implementation*
-
setStatus
The state that thePromise
settled into.- Parameters:
status
- New status value. Default value is *initialized by the implementation*- Returns:
PromiseOutcome
instance, for chaining setter calls
-
getStatus
The state that thePromise
settled into.- Returns:
- Current status value. Default value is *initialized by the implementation*
-
setValue
Only if thestatus
is FULFILLED, the value that thePromise
fulfilled with.- Parameters:
value
- New value value. Default value is *initialized by the implementation*- Returns:
PromiseOutcome
instance, for chaining setter calls
-
getValue
Only if thestatus
is FULFILLED, the value that thePromise
fulfilled with.- Returns:
- Current value value. Default value is *initialized by the implementation*
-