public class EchoServer {
public static void main(String[] args) {
RpcServer server = new RpcServer();
server.registerService(EchoProto.EchoService.newReflectiveService(new Interface() {
@Override
public void echo(RpcController controller, EchoRequest request, RpcCallback<EchoResponse> done) {
done.run(EchoResponse.newBuilder().setPayload(request.getPayload()).build());
}
}));