Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
A server-side class implements the MessengerService interface. In our implementation we have a servlet called MessengerServiceImpl that implements the MessengerService interface, and instead of extending HttpServlet to get the functionality to run in a servlet container, the class extends GWT’s RemoveServiceServlet. The RemoteServiceServlet class is an HttpServlet that does some extra work to translate the RPC calls from a client to invoke method implementations on the class. This class makes implementing the MessengerService on the server very simple and clean without any RPC code. The following example shows an empty server-side RPC implementation:
public class MessengerServiceImpl
extends RemoteServiceServlet implements MessengerService {
public void signIn( String name ){
}
public void signOut(){
}
public void sendMessage( Contact to, Message message ){
}
}