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:
    com.google.gwt.event.shared.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 and Description
    `PromiseOutcome()`
    `PromiseOutcome(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static PromiseOutcome` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `java.lang.Object` | `getReason()` Only if the `status` is REJECTED, the reason that the `Promise` rejected with.
    `SettledPromiseStatus` | `getStatus()` The state that the `Promise` settled into.
    `java.lang.Object` | `getValue()` Only if the `status` is FULFILLED, the value that the `Promise` fulfilled with.
    `PromiseOutcome` | `setReason(java.lang.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(java.lang.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 Detail

    - #### PromiseOutcome

          public PromiseOutcome()

    - #### PromiseOutcome

          public PromiseOutcome(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static PromiseOutcome getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### setReason

          public PromiseOutcome setReason(java.lang.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 java.lang.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(java.lang.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 java.lang.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*