consuming a non standard promise in java

41 views
Skip to first unread message

Elhanan

unread,
Oct 1, 2020, 5:58:56 AM10/1/20
to GWT Users
hi...i'm  consuming cockpit api promises, but it would seem they are using a non standard form which i cannot use with elemental2 

their fail method returns multiple paramters, which elemental2 doesn't have. 
so they recommended using done method (which elemental2 also doesn't have) 

cockpit.spawn(["/opt/aeroscout/engine/run/aeroscout-engine-wd","status"]) .done(data=>console.log("data " + data)) .fail((ex,data) => { console.log(ex); })  

are there any other java gwt Promise libraries i can use?

lofid...@gmail.com

unread,
Oct 1, 2020, 6:09:13 AM10/1/20
to GWT Users
If you want a fast answer, go to https://gitter.im/gwtproject/gwt

All the experts are over there... 😉

Thomas Broyer

unread,
Oct 1, 2020, 8:09:01 AM10/1/20
to GWT Users
There are performance implications (AFAICT) but you should be able to access all arguments through Js.arguments().

…or you could use your own Promise interface mapping to their specific API.
Reply all
Reply to author
Forward
0 new messages