io.grpc.reflection.v1alpha.ErrorResponse Java Examples
The following examples show how to use
io.grpc.reflection.v1alpha.ErrorResponse.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProtoReflectionService.java From grpc-nebula-java with Apache License 2.0 | 5 votes |
private void sendErrorResponse( ServerReflectionRequest request, Status.Code code, String message) { ServerReflectionResponse response = ServerReflectionResponse.newBuilder() .setValidHost(request.getHost()) .setOriginalRequest(request) .setErrorResponse( ErrorResponse.newBuilder() .setErrorCode(code.value()) .setErrorMessage(message)) .build(); serverCallStreamObserver.onNext(response); }
Example #2
Source File: ReflectionService.java From quarkus with Apache License 2.0 | 5 votes |
private ServerReflectionResponse getErrorResponse( ServerReflectionRequest request, Status.Code code, String message) { return ServerReflectionResponse.newBuilder() .setValidHost(request.getHost()) .setOriginalRequest(request) .setErrorResponse( ErrorResponse.newBuilder() .setErrorCode(code.value()) .setErrorMessage(message)) .build(); }
Example #3
Source File: ProtoReflectionService.java From grpc-java with Apache License 2.0 | 5 votes |
private void sendErrorResponse( ServerReflectionRequest request, Status.Code code, String message) { ServerReflectionResponse response = ServerReflectionResponse.newBuilder() .setValidHost(request.getHost()) .setOriginalRequest(request) .setErrorResponse( ErrorResponse.newBuilder() .setErrorCode(code.value()) .setErrorMessage(message)) .build(); serverCallStreamObserver.onNext(response); }