servcice Proxy
This commit is contained in:
snoop 2017-06-30 15:04:40 +09:00
parent 05fd997c81
commit 6d6f93cdee

View File

@ -67,6 +67,12 @@ public class ServiceProxy {
String result = null;
try {
result =this.serviceInvoker.invokeForByteString(request.getTarget(), request.getMethod(), request.getParamsList().asByteStringList());
ServerOutput reply = ServerOutput.newBuilder()
.setResult(result)
.build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
} catch (NoSuchMethodException e) {
e.printStackTrace();
responseObserver.onError(e);
@ -83,11 +89,7 @@ public class ServiceProxy {
e.printStackTrace();
responseObserver.onError(e);
}
ServerOutput reply = ServerOutput.newBuilder()
.setResult(result)
.build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
// String targetServiceName = request.getTarget();
// Object service = ctx.getBean(targetServiceName);