what is the need to create Async and Sync interface in client package and its impl class in Server package when need to impelement RPC in GWT. What is the need to create Sync as well as Async interface in GWT for successful RPC.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In a nutshell: Async is needed for client side, Sync is needed for server side.
All RPC (XmlHttpRequest) calls in Javascript are asynchronous – when network call is finished, your code is called with result.
So on client side with GWT RPC you must provide an Async interface (and implementation of it) in order to be called when results are available.
You must also provide related Sync interface which is implemented on server side.
There is a contract on how Async and Sync interface must be written: http://code.google.com/webtoolkit/doc/latest/tutorial/RPC.html