public interface Promise
| Modifier and Type | Method and Description |
|---|---|
void |
reject(java.lang.String message)
Deprecated.
Prefer passing a module-specific error code to JS. Using this method will pass the
error code "EUNSPECIFIED".
|
void |
reject(java.lang.String code,
java.lang.String message)
Report an error without an exception using a custom code and error message.
|
void |
reject(java.lang.String code,
java.lang.String message,
java.lang.Throwable throwable)
Report an exception with a custom code and error message.
|
void |
reject(java.lang.String code,
java.lang.String message,
java.lang.Throwable throwable,
WritableMap userInfo)
Report an exception with a custom code, error message and userInfo.
|
void |
reject(java.lang.String code,
java.lang.String message,
WritableMap userInfo)
Report an error with a custom code, error message and userInfo, an error not caused by an
exception.
|
void |
reject(java.lang.String code,
java.lang.Throwable throwable)
Report an exception with a custom code.
|
void |
reject(java.lang.String code,
java.lang.Throwable throwable,
WritableMap userInfo)
Report an exception with a custom code and userInfo.
|
void |
reject(java.lang.String code,
WritableMap userInfo)
Reject with a code and userInfo WritableMap.
|
void |
reject(java.lang.Throwable throwable)
Report an exception, with default error code.
|
void |
reject(java.lang.Throwable throwable,
WritableMap userInfo)
Report an exception, with default error code, with userInfo.
|
void |
resolve(java.lang.Object value)
Successfully resolve the Promise with an optional value.
|
void resolve(java.lang.Object value)
value - Objectvoid reject(java.lang.String code,
java.lang.String message)
code - Stringmessage - Stringvoid reject(java.lang.String code,
java.lang.Throwable throwable)
code - Stringthrowable - Throwablevoid reject(java.lang.String code,
java.lang.String message,
java.lang.Throwable throwable)
code - Stringmessage - Stringthrowable - Throwablevoid reject(java.lang.Throwable throwable)
throwable - Throwablevoid reject(java.lang.Throwable throwable,
WritableMap userInfo)
throwable - ThrowableuserInfo - WritableMapvoid reject(java.lang.String code,
WritableMap userInfo)
code - StringuserInfo - WritableMapvoid reject(java.lang.String code,
java.lang.Throwable throwable,
WritableMap userInfo)
code - Stringthrowable - ThrowableuserInfo - WritableMapvoid reject(java.lang.String code,
java.lang.String message,
WritableMap userInfo)
code - Stringmessage - StringuserInfo - WritableMapvoid reject(java.lang.String code,
java.lang.String message,
java.lang.Throwable throwable,
WritableMap userInfo)
code - Stringmessage - Stringthrowable - ThrowableuserInfo - WritableMap@Deprecated void reject(java.lang.String message)