I know that the first one is a class and the second is an interface but the point is,
why should client Services extends the RemoteService and for the ServiceImpl class extends RemoteServiceServlet
So What is Actually behind the Scene ?!
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.
You’re trying to compare apples and oranges. Please read docs and make any simple demo project to clearly understand these concepts.
RemoteService is the interface that RPC interfaces on client side should extend. And RemoteServiceServlet is the servlet base class for your RPC service implementations on the server. It deserializes requests from the client and serializes outgoing responses.
To use the RPC you need create and define in the
clientpackage own interface should extend the RemoteService interface and specifies methods the server should implement.Then you need provide implementation of this interface by server side. This should be a servlet in
serverpackage which extends RemoteServiceServlet and implements theCustomInfoService.Sure to work properly you also need set the servlet mapping, create an asynchronous interface, make its call and process a result in a generated callback, implement the interface Serializable or IsSerializable for classes of instances which are pass over the RPC.