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 PromiseOutcomegetOrCreateRef(JavaScriptObject jsObj) Only if thestatusis REJECTED, the reason that thePromiserejected with.The state that thePromisesettled into.getValue()Only if thestatusis FULFILLED, the value that thePromisefulfilled with.Only if thestatusis REJECTED, the reason that thePromiserejected with.setStatus(SettledPromiseStatus status) The state that thePromisesettled into.Only if thestatusis FULFILLED, the value that thePromisefulfilled 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 thestatusis REJECTED, the reason that thePromiserejected with.- Parameters:
reason- New reason value. Default value is *initialized by the implementation*- Returns:
PromiseOutcomeinstance, for chaining setter calls
-
getReason
Only if thestatusis REJECTED, the reason that thePromiserejected with.- Returns:
- Current reason value. Default value is *initialized by the implementation*
-
setStatus
The state that thePromisesettled into.- Parameters:
status- New status value. Default value is *initialized by the implementation*- Returns:
PromiseOutcomeinstance, for chaining setter calls
-
getStatus
The state that thePromisesettled into.- Returns:
- Current status value. Default value is *initialized by the implementation*
-
setValue
Only if thestatusis FULFILLED, the value that thePromisefulfilled with.- Parameters:
value- New value value. Default value is *initialized by the implementation*- Returns:
PromiseOutcomeinstance, for chaining setter calls
-
getValue
Only if thestatusis FULFILLED, the value that thePromisefulfilled with.- Returns:
- Current value value. Default value is *initialized by the implementation*
-