Interface PublishedServerEventHandlerRpcHandler.PromiseJs

All Superinterfaces:
Serializable
Enclosing class:
PublishedServerEventHandlerRpcHandler

@JsDefinition public static interface PublishedServerEventHandlerRpcHandler.PromiseJs extends Serializable
How the outcome of a server method reaches the promise the client is waiting on, as a JavaScript definition for Element.executeJs(Class).

For internal use only. May be renamed or removed in a future release.

Since:
25.4
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    reject(int promiseId)
    Settles the promise with the failure of the method, which threw rather than returned.
    void
    resolve(int promiseId, Object returnValue)
    Settles the promise with what the method returned.
  • Method Details

    • resolve

      @JsExpression("this.$server[\'}p\']($0, true, $1)") void resolve(int promiseId, Object returnValue)
      Settles the promise with what the method returned.
      Parameters:
      promiseId - the promise the client is waiting on
      returnValue - what the method returned
    • reject

      @JsExpression("this.$server[\'}p\']($0, false)") void reject(int promiseId)
      Settles the promise with the failure of the method, which threw rather than returned.
      Parameters:
      promiseId - the promise the client is waiting on