Clean way in GWT/Java to wait for multiple asynchronous events to finish
I wrote two classes that solve this problem on my project. Basically, each individual callback registers with a parent. The parent waits for each child callback to complete, then fires off it’s own handleSuccess(). The client code looks like this: public void someGwtClientSideMethod() { SomeServiceAsync someService = GWT.create(SomeService.class); ParallelCallback fooCallback = new ParallelCallback(); ParallelCallback barCallback … Read more