Why do you need sync`ed method calls?
I think that you actually need a way to find out when a RPC call has
returned (either one of onSuccess / onFailed).
One way to go with this is to have a simple event system where events
are thrown when changes are made - these changes can be UI
modifications, RPC calls that arrived at client code, etc.
Class Event { String eventName, ..... }
Interface EventHandler { public void handleEvent (Event
event); ...... }
Class EventDispatcher { here I have declared static members /
functions to register and dispatch incoming events }
Now all classes that need events would implement EventHandler.
Registering is done via constructor (or some other means).
We have implemented this system in a relatively large application and
it works like charm :)
Personally I have also used this paradigm for 2 personal projects, one
of them had no server-side and all reads were done with RequestBuilder
- everything went great
Of course, you can extend the system - what I am planning to do for
the library we are working on right now - to "freeze" the client code
until all conditions are satisfied.
Hope this helps,
Alex.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
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
-~----------~----~----~----~------~----~------~--~---