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`

public class PromiseOutcome extends DataClass
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`

  ### Fields inherited from class com.smartgwt.client.core.JsObject

  `jsObj`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PromiseOutcome()`
  `PromiseOutcome(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static PromiseOutcome`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `Object`
  `getReason()`
  Only if the `status` is REJECTED, the reason that the `Promise` rejected with.
  `SettledPromiseStatus`
  `getStatus()`
  The state that the `Promise` settled into.
  `Object`
  `getValue()`
  Only if the `status` is FULFILLED, the value that the `Promise` fulfilled with.
  `PromiseOutcome`
  `setReason(Object reason)`
  Only if the `status` is REJECTED, the reason that the `Promise` rejected with.
  `PromiseOutcome`
  `setStatus(SettledPromiseStatus status)`
  The state that the `Promise` settled into.
  `PromiseOutcome`
  `setValue(Object value)`
  Only if the `status` is FULFILLED, the value that the `Promise` 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`

  ### Methods inherited from class com.smartgwt.client.core.JsObject

  `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PromiseOutcome

    public PromiseOutcome()

  - ### PromiseOutcome

    public PromiseOutcome(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static PromiseOutcome getOrCreateRef(JavaScriptObject jsObj)

  - ### setReason

    public PromiseOutcome setReason(Object reason)
    Only if the `status` is REJECTED, the reason that the `Promise` rejected with.
    Parameters:
      `reason` - New reason value. Default value is *initialized by the implementation*
    Returns:
      `PromiseOutcome` instance, for chaining setter calls

  - ### getReason

    public Object getReason()
    Only if the `status` is REJECTED, the reason that the `Promise` rejected with.
    Returns:
      Current reason value. Default value is *initialized by the implementation*

  - ### setStatus

    public PromiseOutcome setStatus(SettledPromiseStatus status)
    The state that the `Promise` settled into.
    Parameters:
      `status` - New status value. Default value is *initialized by the implementation*
    Returns:
      `PromiseOutcome` instance, for chaining setter calls

  - ### getStatus

    public SettledPromiseStatus getStatus()
    The state that the `Promise` settled into.
    Returns:
      Current status value. Default value is *initialized by the implementation*

  - ### setValue

    public PromiseOutcome setValue(Object value)
    Only if the `status` is FULFILLED, the value that the `Promise` fulfilled with.
    Parameters:
      `value` - New value value. Default value is *initialized by the implementation*
    Returns:
      `PromiseOutcome` instance, for chaining setter calls

  - ### getValue

    public Object getValue()
    Only if the `status` is FULFILLED, the value that the `Promise` fulfilled with.
    Returns:
      Current value value. Default value is *initialized by the implementation*