concept remote method in category seam

This is an excerpt from Manning's book Seam in Action.
The stub is responsible for carrying out method execution on the server-side component instance. When a method is invoked on the stub, a new Ajax request is prepared and sent across the wire to the server. The request communicates the method to execute and carries with it parameters that need to be passed to the remote method. If the method has a return value, that value is encoded into the response of the Ajax request. As the response comes back across the wire, it’s received by the remoting framework, which converts the return value, if present, into a JavaScript object. This process is illustrated in figure 12.4.
If the member responds, we initiate another method invocation, this time to verify whether the response is correct. In the call to the answerQuestion() method, the callback function is moved to the third slot. The callback function is always the n+1 parameter, where n is the number of parameters in the remote method. The reportResult() callback JavaScript function handles the verdict (in a crude fashion):