I would say your only choice is to count all active/pending RPC calls,
along with firing an IdleEvent (counter == 0) and BusyEvent (counter > 0)
on the event bus. How you easily count RPC calls somehow depends on your
current app design.
If you use RequestFactory you can probably use a custom RequestTransport
implementation that counts pending requests.
For GWT-RPC you probably have to wrap each RPC service in an additional
class (which implements your service interface and delegates to the real
service) so you can add additional functionalities (e.g. counting) when
doing RPC method calls.
-- J.
Am Freitag, 23. März 2012 18:39:48 UTC+1 schrieb Magnus:
>
> Hello,
>
> I need to execute some code *after* all pending rpc calls have
> terminated, e. g.:
>
> ...
> void onModuleLoad()
> {
> doRPCcalls();
>
> scheduledAction();
> }
>
> void scheduledAction()
> {
> Window.alert("This should be called after all RPC calls have
> terminated");
> }
>
> I want to avoid placing the scheduled actions somewhere in the
> onSuccess method of the RPC call. I just want to say "do this when the
> current tasks are done".
>
> Can I do this somehow?
>
> Thanks
> Magnus
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/9CezHsxxWeAJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.