public interface Action
action.resolve("Success");
Call action.reject( [rejection reason] ) to make the Promise's status rejected and move on to the next processing(specified by then) with the
result(rejection reason).
action.reject("Failure");
Argument is optional, you can call action.resolve() or action.reject()
action.resolve();//Argument can be omitted| Modifier and Type | Method | Description |
|---|---|---|
void |
reject() |
To make the Promise's status rejected and move on to the next processing(specified by then) with null reason
|
void |
reject(Object reason) |
To make the Promise's status rejected and move on to the next processing(specified by then) with reason
|
void |
resolve() |
To make the Promise's status fulfilled and move on to the next processing(specified by then) with null result
|
void |
resolve(Object result) |
To make the Promise's status fulfilled and move on to the next processing(specified by then) with the result(fulfillment value).
|
void resolve(Object result)
result - void resolve()
result - void reject(Object reason)
result - void reject()
result - Copyright © 2019. All rights reserved.