concept server - side component in category seam

This is an excerpt from Manning's book Seam in Action.
Seam gives you tools to build rich, Web 2.0 applications or to gently weave this richness into an existing page-oriented application. Lately, the term “rich” has become synonymous with a desktop-like experience in the web browser driven by Ajax. There are two approaches you can take to incorporate Ajax into a Seam application. You can use Ajax-enabled JSF components, such as RichFaces or ICEfaces, or you can invoke server-side components directly from the browser using JavaScript remoting. Seam extends the meaning of rich to incorporate media such as PDFs, charts, and graphics.
Throughout this book, I’ve demonstrated the ability of Seam’s component model to manage state and provide access to a wide range of technologies. By incorporating Seam’s remoting library into your application, you enable JavaScript to tap into that server-side model and reap its benefits. In the same way that the @Name annotation on a component makes that component accessible to JSF and the EL, the @WebRemote annotation on a component method makes that method accessible to JavaScript, effectively binding JavaScript code to server-side components with little effort.
Every method call made to the server-side component is done asynchronously, which means that it is nonblocking. After all, freezing the browser would defeat the purpose of Ajax. What that means, though, is that the result of the remote method call isn’t available immediately to the executing thread. As such, the method on the stub doesn’t have a value to return, even if the matching server-side method has one. When a method on the remote stub is executed, it is effectively saying, “I’ll get back to you on that. Do you have a number where I can reach you?” The number you provide is a “callback” JavaScript function.
The callback function is a standard construct in asynchronous APIs. It’s executed by the remoting framework when a response from an Ajax request arrives back at the browser. If the method on the server-side component has a nonvoid return value, that value is passed into the callback function as its only argument. If the method on the server-side component has a void return type, the callback function takes no arguments. (Actually, the final argument is always the Seam remoting context, which is covered in section 12.5.2.)