You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* If you don't need promise-returning methods, simply leave java.asyncOptions unset.
173
+
* If you don't want promise-returning methods, simply leave `java.asyncOptions` unset.
172
174
* Sync and standard async methods are still generated as in previous releases. In the future we may provide the option to disable generation of standard async methods.
173
-
* You are free to choose whatever non-empty suffix you want for the promise-returning methods, but you must specify a value.
174
-
* asyncOptions.promisify must be a function that given a node.js style async function as input returns a function that returns a promise that is resolved (or rejected) when the async function has completed. Several Promises libraries provide such functions. This *should* just work, but at the moment one prominent promises library doesn't.
175
-
* Note that it should be possible to mix use of two different Promises/A+ conforming libraries. You may be able to use one library for installing the asyncOptions.promisify function, and then use another library everywhere else in your application.
176
-
177
-
#### Tested Promises Libraries
178
-
179
-
##### [when](https://www.npmjs.com/package/when)
180
-
We use this package in our unit tests, and it passes under all 9 cases of our [test matrix](https://travis-ci.org/joeferner/node-java).
Does not work with node 0.8, but works with node 0.10 and 0.11.
186
-
187
-
`promisify:require('bluebird').promisify`
175
+
* `asyncOptions.promisify` must be a function that given a node.js style async function as input returns a function that returns a promise that is resolved (or rejected) when the async function has completed. Several Promises/A+ libraries provide such functions, but it may be necessary to provide a wrapper function. See `testHelpers.js` for an example.
176
+
* You are free to choose whatever non-empty `promiseSuffix` you want for the promise-returning methods, but you must specify a value.
177
+
* We've tested with five Promises/A+ implementations. See `testHelpers.js` for more information.
178
+
* NOTE: Due to specifics of initialization order, the methods `java.newInstancePromise`, `java.callMethodPromise`, and `java.callStaticMethodPromise` are not available until some other java method is called. You may need to call some other java method such as `java.import()` to finalize java initialization.
188
179
189
-
##### [Q](https://www.npmjs.com/package/q)
190
-
Unfortunately, the popular Q promises library currently does **NOT** work.
0 commit comments