This is a good question, but I do not think this is a simple solution.
I believe that you will need to create a separate method that combines your methods to ensure batch processing in accordance with the DWR.
Those. if you have:
public int add(int x, int y); public int sub(int i, int j);
Create a new method to combine them:
public Map<String, Integer> addAndSub(Map methodsAndArguments) { // Call add and sub methods with it arguments }
You still have to handle the entire response in the same callback method, of course.
I understand that this may not be the most elegant solution, but because of how the GWTs RPC works, I think this is the way to go. With GWT, I think that you are usually trying to write your methods so that batch processing is not even a problem that you have to consider.
stian
source share