mirror of https://github.com/grpc/grpc-java.git
Migrate from PARSER to parser() as a way of getting the parser of a protobuf message.
This was done by #587 (commitaf9fb6de77) but was accidentally reverted by commit73acc73dbf.
This commit is contained in:
parent
0003e44886
commit
79f3f026f2
|
|
@ -21,16 +21,16 @@ public class TestServiceGrpc {
|
|||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.UNARY,
|
||||
"grpc.testing.TestService", "UnaryCall",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleRequest.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleResponse.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleRequest.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleResponse.parser()));
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.testing.SimpleRequest,
|
||||
io.grpc.testing.SimpleResponse> METHOD_STREAMING_CALL =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
|
||||
"grpc.testing.TestService", "StreamingCall",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleRequest.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleResponse.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleRequest.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.SimpleResponse.parser()));
|
||||
|
||||
public static TestServiceStub newStub(io.grpc.Channel channel) {
|
||||
return new TestServiceStub(channel, CONFIG);
|
||||
|
|
|
|||
|
|
@ -21,16 +21,16 @@ public class WorkerGrpc {
|
|||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
|
||||
"grpc.testing.Worker", "RunTest",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ClientArgs.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ClientStatus.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ClientArgs.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ClientStatus.parser()));
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.testing.ServerArgs,
|
||||
io.grpc.testing.ServerStatus> METHOD_RUN_SERVER =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
|
||||
"grpc.testing.Worker", "RunServer",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ServerArgs.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ServerStatus.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ServerArgs.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.ServerStatus.parser()));
|
||||
|
||||
public static WorkerStub newStub(io.grpc.Channel channel) {
|
||||
return new WorkerStub(channel, CONFIG);
|
||||
|
|
|
|||
|
|
@ -122,8 +122,8 @@ static void PrintMethodFields(
|
|||
" $MethodDescriptor$.create(\n"
|
||||
" $MethodType$.$method_type$,\n"
|
||||
" \"$Package$$service_name$\", \"$method_name$\",\n"
|
||||
" $ProtoUtils$.marshaller($input_type$.PARSER),\n"
|
||||
" $ProtoUtils$.marshaller($output_type$.PARSER));\n");
|
||||
" $ProtoUtils$.marshaller($input_type$.parser()),\n"
|
||||
" $ProtoUtils$.marshaller($output_type$.parser()));\n");
|
||||
}
|
||||
}
|
||||
p->Print("\n");
|
||||
|
|
|
|||
|
|
@ -21,40 +21,40 @@ public class TestServiceGrpc {
|
|||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.UNARY,
|
||||
"grpc.testing.TestService", "UnaryCall",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleRequest.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleResponse.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleRequest.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.SimpleResponse.parser()));
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
|
||||
io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING,
|
||||
"grpc.testing.TestService", "StreamingOutputCall",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.parser()));
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingInputCallRequest,
|
||||
io.grpc.testing.integration.Test.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING,
|
||||
"grpc.testing.TestService", "StreamingInputCall",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallRequest.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallResponse.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallRequest.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallResponse.parser()));
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
|
||||
io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_FULL_DUPLEX_CALL =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
|
||||
"grpc.testing.TestService", "FullDuplexCall",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.parser()));
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
|
||||
io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_HALF_DUPLEX_CALL =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
|
||||
"grpc.testing.TestService", "HalfDuplexCall",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.parser()));
|
||||
|
||||
public static TestServiceStub newStub(io.grpc.Channel channel) {
|
||||
return new TestServiceStub(channel, CONFIG);
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ public class GreeterGrpc {
|
|||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.UNARY,
|
||||
"helloworld.Greeter", "SayHello",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.helloworld.HelloRequest.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.helloworld.HelloResponse.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.helloworld.HelloRequest.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.helloworld.HelloResponse.parser()));
|
||||
|
||||
public static GreeterStub newStub(io.grpc.Channel channel) {
|
||||
return new GreeterStub(channel, CONFIG);
|
||||
|
|
|
|||
|
|
@ -21,32 +21,32 @@ public class RouteGuideGrpc {
|
|||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.UNARY,
|
||||
"routeguide.RouteGuide", "GetFeature",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Point.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Feature.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Point.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Feature.parser()));
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.examples.routeguide.Rectangle,
|
||||
io.grpc.examples.routeguide.Feature> METHOD_LIST_FEATURES =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING,
|
||||
"routeguide.RouteGuide", "ListFeatures",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Rectangle.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Feature.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Rectangle.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Feature.parser()));
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.examples.routeguide.Point,
|
||||
io.grpc.examples.routeguide.RouteSummary> METHOD_RECORD_ROUTE =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING,
|
||||
"routeguide.RouteGuide", "RecordRoute",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Point.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteSummary.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Point.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteSummary.parser()));
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.examples.routeguide.RouteNote,
|
||||
io.grpc.examples.routeguide.RouteNote> METHOD_ROUTE_CHAT =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
|
||||
"routeguide.RouteGuide", "RouteChat",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteNote.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteNote.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteNote.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteNote.parser()));
|
||||
|
||||
public static RouteGuideStub newStub(io.grpc.Channel channel) {
|
||||
return new RouteGuideStub(channel, CONFIG);
|
||||
|
|
|
|||
|
|
@ -21,48 +21,48 @@ public class TestServiceGrpc {
|
|||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.UNARY,
|
||||
"grpc.testing.TestService", "EmptyCall",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.EmptyProtos.Empty.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.EmptyProtos.Empty.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.EmptyProtos.Empty.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.EmptyProtos.Empty.parser()));
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.SimpleRequest,
|
||||
io.grpc.testing.integration.Messages.SimpleResponse> METHOD_UNARY_CALL =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.UNARY,
|
||||
"grpc.testing.TestService", "UnaryCall",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.SimpleRequest.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.SimpleResponse.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.SimpleRequest.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.SimpleResponse.parser()));
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
|
||||
io.grpc.testing.integration.Messages.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING,
|
||||
"grpc.testing.TestService", "StreamingOutputCall",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.parser()));
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingInputCallRequest,
|
||||
io.grpc.testing.integration.Messages.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING,
|
||||
"grpc.testing.TestService", "StreamingInputCall",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingInputCallRequest.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingInputCallResponse.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingInputCallRequest.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingInputCallResponse.parser()));
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
|
||||
io.grpc.testing.integration.Messages.StreamingOutputCallResponse> METHOD_FULL_DUPLEX_CALL =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
|
||||
"grpc.testing.TestService", "FullDuplexCall",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.parser()));
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
|
||||
io.grpc.testing.integration.Messages.StreamingOutputCallResponse> METHOD_HALF_DUPLEX_CALL =
|
||||
io.grpc.MethodDescriptor.create(
|
||||
io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
|
||||
"grpc.testing.TestService", "HalfDuplexCall",
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.PARSER),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.PARSER));
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.parser()),
|
||||
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.parser()));
|
||||
|
||||
public static TestServiceStub newStub(io.grpc.Channel channel) {
|
||||
return new TestServiceStub(channel, CONFIG);
|
||||
|
|
|
|||
Loading…
Reference in New Issue