Rename Duplex to Bidi
diff --git a/benchmarks/src/generated/main/grpc/io/grpc/testing/TestServiceGrpc.java b/benchmarks/src/generated/main/grpc/io/grpc/testing/TestServiceGrpc.java
index 4d980e3..f7ade1d 100644
--- a/benchmarks/src/generated/main/grpc/io/grpc/testing/TestServiceGrpc.java
+++ b/benchmarks/src/generated/main/grpc/io/grpc/testing/TestServiceGrpc.java
@@ -3,14 +3,14 @@
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
-import static io.grpc.stub.ClientCalls.asyncDuplexStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
-import static io.grpc.stub.ServerCalls.asyncDuplexStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
@javax.annotation.Generated("by gRPC proto compiler")
public class TestServiceGrpc {
@@ -26,7 +26,7 @@
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,
+ io.grpc.MethodDescriptor.MethodType.BIDI_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()));
@@ -92,7 +92,7 @@
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.SimpleRequest> streamingCall(
io.grpc.stub.StreamObserver<io.grpc.testing.SimpleResponse> responseObserver) {
- return asyncDuplexStreamingCall(
+ return asyncBidiStreamingCall(
channel.newCall(METHOD_STREAMING_CALL, callOptions), responseObserver);
}
}
@@ -164,8 +164,8 @@
})))
.addMethod(io.grpc.ServerMethodDefinition.create(
METHOD_STREAMING_CALL,
- asyncDuplexStreamingCall(
- new io.grpc.stub.ServerCalls.DuplexStreamingMethod<
+ asyncBidiStreamingCall(
+ new io.grpc.stub.ServerCalls.BidiStreamingMethod<
io.grpc.testing.SimpleRequest,
io.grpc.testing.SimpleResponse>() {
@java.lang.Override
diff --git a/benchmarks/src/generated/main/grpc/io/grpc/testing/WorkerGrpc.java b/benchmarks/src/generated/main/grpc/io/grpc/testing/WorkerGrpc.java
index ccea8f1..357e366 100644
--- a/benchmarks/src/generated/main/grpc/io/grpc/testing/WorkerGrpc.java
+++ b/benchmarks/src/generated/main/grpc/io/grpc/testing/WorkerGrpc.java
@@ -3,14 +3,14 @@
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
-import static io.grpc.stub.ClientCalls.asyncDuplexStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
-import static io.grpc.stub.ServerCalls.asyncDuplexStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
@javax.annotation.Generated("by gRPC proto compiler")
public class WorkerGrpc {
@@ -19,14 +19,14 @@
public static final io.grpc.MethodDescriptor<io.grpc.testing.ClientArgs,
io.grpc.testing.ClientStatus> METHOD_RUN_TEST =
io.grpc.MethodDescriptor.create(
- io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
+ io.grpc.MethodDescriptor.MethodType.BIDI_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()));
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,
+ io.grpc.MethodDescriptor.MethodType.BIDI_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()));
@@ -80,14 +80,14 @@
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.ClientArgs> runTest(
io.grpc.stub.StreamObserver<io.grpc.testing.ClientStatus> responseObserver) {
- return asyncDuplexStreamingCall(
+ return asyncBidiStreamingCall(
channel.newCall(METHOD_RUN_TEST, callOptions), responseObserver);
}
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.ServerArgs> runServer(
io.grpc.stub.StreamObserver<io.grpc.testing.ServerStatus> responseObserver) {
- return asyncDuplexStreamingCall(
+ return asyncBidiStreamingCall(
channel.newCall(METHOD_RUN_SERVER, callOptions), responseObserver);
}
}
@@ -133,8 +133,8 @@
return io.grpc.ServerServiceDefinition.builder("grpc.testing.Worker")
.addMethod(io.grpc.ServerMethodDefinition.create(
METHOD_RUN_TEST,
- asyncDuplexStreamingCall(
- new io.grpc.stub.ServerCalls.DuplexStreamingMethod<
+ asyncBidiStreamingCall(
+ new io.grpc.stub.ServerCalls.BidiStreamingMethod<
io.grpc.testing.ClientArgs,
io.grpc.testing.ClientStatus>() {
@java.lang.Override
@@ -145,8 +145,8 @@
})))
.addMethod(io.grpc.ServerMethodDefinition.create(
METHOD_RUN_SERVER,
- asyncDuplexStreamingCall(
- new io.grpc.stub.ServerCalls.DuplexStreamingMethod<
+ asyncBidiStreamingCall(
+ new io.grpc.stub.ServerCalls.BidiStreamingMethod<
io.grpc.testing.ServerArgs,
io.grpc.testing.ServerStatus>() {
@java.lang.Override
diff --git a/benchmarks/src/jmh/java/io/grpc/benchmarks/netty/AbstractBenchmark.java b/benchmarks/src/jmh/java/io/grpc/benchmarks/netty/AbstractBenchmark.java
index ceefa0a..2ed262c 100644
--- a/benchmarks/src/jmh/java/io/grpc/benchmarks/netty/AbstractBenchmark.java
+++ b/benchmarks/src/jmh/java/io/grpc/benchmarks/netty/AbstractBenchmark.java
@@ -225,11 +225,11 @@
"benchmark", "unary",
new ByteBufOutputMarshaller(),
new ByteBufOutputMarshaller());
- pingPongMethod = MethodDescriptor.create(MethodType.DUPLEX_STREAMING,
+ pingPongMethod = MethodDescriptor.create(MethodType.BIDI_STREAMING,
"benchmark", "pingPong",
new ByteBufOutputMarshaller(),
new ByteBufOutputMarshaller());
- flowControlledStreaming = MethodDescriptor.create(MethodType.DUPLEX_STREAMING,
+ flowControlledStreaming = MethodDescriptor.create(MethodType.BIDI_STREAMING,
"benchmark", "flowControlledStreaming",
new ByteBufOutputMarshaller(),
new ByteBufOutputMarshaller());
@@ -408,7 +408,7 @@
channel.newCall(pingPongMethod, CALL_OPTIONS);
final AtomicReference<StreamObserver<ByteBuf>> requestObserverRef =
new AtomicReference<StreamObserver<ByteBuf>>();
- StreamObserver<ByteBuf> requestObserver = ClientCalls.asyncDuplexStreamingCall(
+ StreamObserver<ByteBuf> requestObserver = ClientCalls.asyncBidiStreamingCall(
streamingCall,
new StreamObserver<ByteBuf>() {
@Override
@@ -453,7 +453,7 @@
channel.newCall(flowControlledStreaming, CALL_OPTIONS);
final AtomicReference<StreamObserver<ByteBuf>> requestObserverRef =
new AtomicReference<StreamObserver<ByteBuf>>();
- StreamObserver<ByteBuf> requestObserver = ClientCalls.asyncDuplexStreamingCall(
+ StreamObserver<ByteBuf> requestObserver = ClientCalls.asyncBidiStreamingCall(
streamingCall,
new StreamObserver<ByteBuf>() {
@Override
diff --git a/compiler/src/java_plugin/cpp/java_generator.cpp b/compiler/src/java_plugin/cpp/java_generator.cpp
index 7bff09d..e24b03b 100644
--- a/compiler/src/java_plugin/cpp/java_generator.cpp
+++ b/compiler/src/java_plugin/cpp/java_generator.cpp
@@ -74,7 +74,7 @@
bool server_streaming = method->server_streaming();
if (client_streaming) {
if (server_streaming) {
- (*vars)["method_type"] = "DUPLEX_STREAMING";
+ (*vars)["method_type"] = "BIDI_STREAMING";
} else {
(*vars)["method_type"] = "CLIENT_STREAMING";
}
@@ -299,7 +299,7 @@
break;
case ASYNC_CALL:
if (client_streaming) {
- // Duplex streaming or client streaming
+ // Bidirectional streaming or client streaming
p->Print(
*vars,
"$StreamObserver$<$input_type$> $lower_method_name$(\n"
@@ -346,7 +346,7 @@
case ASYNC_CALL:
if (server_streaming) {
if (client_streaming) {
- (*vars)["calls_method"] = "asyncDuplexStreamingCall";
+ (*vars)["calls_method"] = "asyncBidiStreamingCall";
(*vars)["params"] = "responseObserver";
} else {
(*vars)["calls_method"] = "asyncServerStreamingCall";
@@ -412,9 +412,9 @@
bool server_streaming = method->server_streaming();
if (client_streaming) {
if (server_streaming) {
- (*vars)["calls_method"] = "asyncDuplexStreamingCall";
+ (*vars)["calls_method"] = "asyncBidiStreamingCall";
(*vars)["invocation_class"] =
- "io.grpc.stub.ServerCalls.DuplexStreamingMethod";
+ "io.grpc.stub.ServerCalls.BidiStreamingMethod";
} else {
(*vars)["calls_method"] = "asyncClientStreamingCall";
(*vars)["invocation_class"] =
@@ -543,7 +543,7 @@
"import static "
"io.grpc.stub.ClientCalls.asyncClientStreamingCall;\n"
"import static "
- "io.grpc.stub.ClientCalls.asyncDuplexStreamingCall;\n"
+ "io.grpc.stub.ClientCalls.asyncBidiStreamingCall;\n"
"import static "
"io.grpc.stub.ClientCalls.blockingUnaryCall;\n"
"import static "
@@ -557,7 +557,7 @@
"import static "
"io.grpc.stub.ServerCalls.asyncClientStreamingCall;\n"
"import static "
- "io.grpc.stub.ServerCalls.asyncDuplexStreamingCall;\n\n");
+ "io.grpc.stub.ServerCalls.asyncBidiStreamingCall;\n\n");
if (generate_nano) {
p->Print("import java.io.IOException;\n\n");
}
diff --git a/compiler/src/test/golden/TestService.java.txt b/compiler/src/test/golden/TestService.java.txt
index dcf1d83..e897816 100644
--- a/compiler/src/test/golden/TestService.java.txt
+++ b/compiler/src/test/golden/TestService.java.txt
@@ -3,14 +3,14 @@
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
-import static io.grpc.stub.ClientCalls.asyncDuplexStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
-import static io.grpc.stub.ServerCalls.asyncDuplexStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
@javax.annotation.Generated("by gRPC proto compiler")
public class TestServiceGrpc {
@@ -38,17 +38,17 @@
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallRequest.parser()),
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingInputCallResponse.parser()));
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
- io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_FULL_DUPLEX_CALL =
+ io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_FULL_BIDI_CALL =
io.grpc.MethodDescriptor.create(
- io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
- "grpc.testing.TestService", "FullDuplexCall",
+ io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
+ "grpc.testing.TestService", "FullBidiCall",
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 final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
- io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_HALF_DUPLEX_CALL =
+ io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_HALF_BIDI_CALL =
io.grpc.MethodDescriptor.create(
- io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
- "grpc.testing.TestService", "HalfDuplexCall",
+ io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
+ "grpc.testing.TestService", "HalfBidiCall",
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallRequest.parser()),
io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Test.StreamingOutputCallResponse.parser()));
@@ -77,10 +77,10 @@
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> streamingInputCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver);
- public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullDuplexCall(
+ public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullBidiCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
- public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfDuplexCall(
+ public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfBidiCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
}
@@ -137,17 +137,17 @@
}
@java.lang.Override
- public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullDuplexCall(
+ public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullBidiCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
- return asyncDuplexStreamingCall(
- channel.newCall(METHOD_FULL_DUPLEX_CALL, callOptions), responseObserver);
+ return asyncBidiStreamingCall(
+ channel.newCall(METHOD_FULL_BIDI_CALL, callOptions), responseObserver);
}
@java.lang.Override
- public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfDuplexCall(
+ public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfBidiCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
- return asyncDuplexStreamingCall(
- channel.newCall(METHOD_HALF_DUPLEX_CALL, callOptions), responseObserver);
+ return asyncBidiStreamingCall(
+ channel.newCall(METHOD_HALF_BIDI_CALL, callOptions), responseObserver);
}
}
@@ -249,27 +249,27 @@
}
})))
.addMethod(io.grpc.ServerMethodDefinition.create(
- METHOD_FULL_DUPLEX_CALL,
- asyncDuplexStreamingCall(
- new io.grpc.stub.ServerCalls.DuplexStreamingMethod<
+ METHOD_FULL_BIDI_CALL,
+ asyncBidiStreamingCall(
+ new io.grpc.stub.ServerCalls.BidiStreamingMethod<
io.grpc.testing.integration.Test.StreamingOutputCallRequest,
io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> invoke(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
- return serviceImpl.fullDuplexCall(responseObserver);
+ return serviceImpl.fullBidiCall(responseObserver);
}
})))
.addMethod(io.grpc.ServerMethodDefinition.create(
- METHOD_HALF_DUPLEX_CALL,
- asyncDuplexStreamingCall(
- new io.grpc.stub.ServerCalls.DuplexStreamingMethod<
+ METHOD_HALF_BIDI_CALL,
+ asyncBidiStreamingCall(
+ new io.grpc.stub.ServerCalls.BidiStreamingMethod<
io.grpc.testing.integration.Test.StreamingOutputCallRequest,
io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> invoke(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
- return serviceImpl.halfDuplexCall(responseObserver);
+ return serviceImpl.halfBidiCall(responseObserver);
}
}))).build();
}
diff --git a/compiler/src/test/golden/TestServiceNano.java.txt b/compiler/src/test/golden/TestServiceNano.java.txt
index 1b823ab..edcb936 100644
--- a/compiler/src/test/golden/TestServiceNano.java.txt
+++ b/compiler/src/test/golden/TestServiceNano.java.txt
@@ -3,14 +3,14 @@
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
-import static io.grpc.stub.ClientCalls.asyncDuplexStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
-import static io.grpc.stub.ServerCalls.asyncDuplexStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import java.io.IOException;
@@ -76,10 +76,10 @@
}
}));
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
- io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_FULL_DUPLEX_CALL =
+ io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_FULL_BIDI_CALL =
io.grpc.MethodDescriptor.create(
- io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
- "grpc.testing.TestService", "FullDuplexCall",
+ io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
+ "grpc.testing.TestService", "FullBidiCall",
io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.Test.StreamingOutputCallRequest>marshaller(
new io.grpc.protobuf.nano.Parser<io.grpc.testing.integration.Test.StreamingOutputCallRequest>() {
@Override
@@ -95,10 +95,10 @@
}
}));
public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Test.StreamingOutputCallRequest,
- io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_HALF_DUPLEX_CALL =
+ io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_HALF_BIDI_CALL =
io.grpc.MethodDescriptor.create(
- io.grpc.MethodDescriptor.MethodType.DUPLEX_STREAMING,
- "grpc.testing.TestService", "HalfDuplexCall",
+ io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
+ "grpc.testing.TestService", "HalfBidiCall",
io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.Test.StreamingOutputCallRequest>marshaller(
new io.grpc.protobuf.nano.Parser<io.grpc.testing.integration.Test.StreamingOutputCallRequest>() {
@Override
@@ -139,10 +139,10 @@
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallRequest> streamingInputCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingInputCallResponse> responseObserver);
- public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullDuplexCall(
+ public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullBidiCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
- public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfDuplexCall(
+ public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfBidiCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver);
}
@@ -199,17 +199,17 @@
}
@java.lang.Override
- public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullDuplexCall(
+ public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> fullBidiCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
- return asyncDuplexStreamingCall(
- channel.newCall(METHOD_FULL_DUPLEX_CALL, callOptions), responseObserver);
+ return asyncBidiStreamingCall(
+ channel.newCall(METHOD_FULL_BIDI_CALL, callOptions), responseObserver);
}
@java.lang.Override
- public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfDuplexCall(
+ public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> halfBidiCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
- return asyncDuplexStreamingCall(
- channel.newCall(METHOD_HALF_DUPLEX_CALL, callOptions), responseObserver);
+ return asyncBidiStreamingCall(
+ channel.newCall(METHOD_HALF_BIDI_CALL, callOptions), responseObserver);
}
}
@@ -311,27 +311,27 @@
}
})))
.addMethod(io.grpc.ServerMethodDefinition.create(
- METHOD_FULL_DUPLEX_CALL,
- asyncDuplexStreamingCall(
- new io.grpc.stub.ServerCalls.DuplexStreamingMethod<
+ METHOD_FULL_BIDI_CALL,
+ asyncBidiStreamingCall(
+ new io.grpc.stub.ServerCalls.BidiStreamingMethod<
io.grpc.testing.integration.Test.StreamingOutputCallRequest,
io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> invoke(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
- return serviceImpl.fullDuplexCall(responseObserver);
+ return serviceImpl.fullBidiCall(responseObserver);
}
})))
.addMethod(io.grpc.ServerMethodDefinition.create(
- METHOD_HALF_DUPLEX_CALL,
- asyncDuplexStreamingCall(
- new io.grpc.stub.ServerCalls.DuplexStreamingMethod<
+ METHOD_HALF_BIDI_CALL,
+ asyncBidiStreamingCall(
+ new io.grpc.stub.ServerCalls.BidiStreamingMethod<
io.grpc.testing.integration.Test.StreamingOutputCallRequest,
io.grpc.testing.integration.Test.StreamingOutputCallResponse>() {
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallRequest> invoke(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Test.StreamingOutputCallResponse> responseObserver) {
- return serviceImpl.halfDuplexCall(responseObserver);
+ return serviceImpl.halfBidiCall(responseObserver);
}
}))).build();
}
diff --git a/compiler/src/test/proto/test.proto b/compiler/src/test/proto/test.proto
index ba4938d..5b4a267 100644
--- a/compiler/src/test/proto/test.proto
+++ b/compiler/src/test/proto/test.proto
@@ -40,14 +40,14 @@
// A sequence of requests with each request served by the server immediately.
// As one request could lead to multiple responses, this interface
- // demonstrates the idea of full duplexing.
- rpc FullDuplexCall(stream StreamingOutputCallRequest)
+ // demonstrates the idea of full bidirectionality.
+ rpc FullBidiCall(stream StreamingOutputCallRequest)
returns (stream StreamingOutputCallResponse);
// A sequence of requests followed by a sequence of responses.
// The server buffers all the client requests and then serves them in order. A
// stream of responses are returned to the client when the server starts with
// first request.
- rpc HalfDuplexCall(stream StreamingOutputCallRequest)
+ rpc HalfBidiCall(stream StreamingOutputCallRequest)
returns (stream StreamingOutputCallResponse);
}
diff --git a/core/src/main/java/io/grpc/MethodDescriptor.java b/core/src/main/java/io/grpc/MethodDescriptor.java
index 816ba70..c5bcdb5 100644
--- a/core/src/main/java/io/grpc/MethodDescriptor.java
+++ b/core/src/main/java/io/grpc/MethodDescriptor.java
@@ -76,11 +76,11 @@
/**
* Zero or more request and response messages arbitrarily interleaved in time.
*/
- DUPLEX_STREAMING,
+ BIDI_STREAMING,
/**
* Cardinality and temporal relationships are not known. Implementations should not make
- * buffering assumptions and should largely treat the same as {@link #DUPLEX_STREAMING}.
+ * buffering assumptions and should largely treat the same as {@link #BIDI_STREAMING}.
*/
UNKNOWN;
diff --git a/examples/src/generated/main/grpc/io/grpc/examples/helloworld/GreeterGrpc.java b/examples/src/generated/main/grpc/io/grpc/examples/helloworld/GreeterGrpc.java
index 79b3aad..0240a67 100644
--- a/examples/src/generated/main/grpc/io/grpc/examples/helloworld/GreeterGrpc.java
+++ b/examples/src/generated/main/grpc/io/grpc/examples/helloworld/GreeterGrpc.java
@@ -3,14 +3,14 @@
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
-import static io.grpc.stub.ClientCalls.asyncDuplexStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
-import static io.grpc.stub.ServerCalls.asyncDuplexStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
@javax.annotation.Generated("by gRPC proto compiler")
public class GreeterGrpc {
diff --git a/examples/src/generated/main/grpc/io/grpc/examples/routeguide/RouteGuideGrpc.java b/examples/src/generated/main/grpc/io/grpc/examples/routeguide/RouteGuideGrpc.java
index 9b7e967..adc6042 100644
--- a/examples/src/generated/main/grpc/io/grpc/examples/routeguide/RouteGuideGrpc.java
+++ b/examples/src/generated/main/grpc/io/grpc/examples/routeguide/RouteGuideGrpc.java
@@ -3,14 +3,14 @@
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
-import static io.grpc.stub.ClientCalls.asyncDuplexStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
-import static io.grpc.stub.ServerCalls.asyncDuplexStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
@javax.annotation.Generated("by gRPC proto compiler")
public class RouteGuideGrpc {
@@ -40,7 +40,7 @@
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,
+ io.grpc.MethodDescriptor.MethodType.BIDI_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()));
@@ -129,7 +129,7 @@
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.examples.routeguide.RouteNote> routeChat(
io.grpc.stub.StreamObserver<io.grpc.examples.routeguide.RouteNote> responseObserver) {
- return asyncDuplexStreamingCall(
+ return asyncBidiStreamingCall(
channel.newCall(METHOD_ROUTE_CHAT, callOptions), responseObserver);
}
}
@@ -233,8 +233,8 @@
})))
.addMethod(io.grpc.ServerMethodDefinition.create(
METHOD_ROUTE_CHAT,
- asyncDuplexStreamingCall(
- new io.grpc.stub.ServerCalls.DuplexStreamingMethod<
+ asyncBidiStreamingCall(
+ new io.grpc.stub.ServerCalls.BidiStreamingMethod<
io.grpc.examples.routeguide.RouteNote,
io.grpc.examples.routeguide.RouteNote>() {
@java.lang.Override
diff --git a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java
index 1841c95..9dc4235 100644
--- a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java
+++ b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java
@@ -3,14 +3,14 @@
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
-import static io.grpc.stub.ClientCalls.asyncDuplexStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
-import static io.grpc.stub.ServerCalls.asyncDuplexStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
@javax.annotation.Generated("by gRPC proto compiler")
public class TestServiceGrpc {
@@ -47,14 +47,14 @@
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,
+ io.grpc.MethodDescriptor.MethodType.BIDI_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()));
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,
+ io.grpc.MethodDescriptor.MethodType.BIDI_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()));
@@ -161,14 +161,14 @@
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> fullDuplexCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) {
- return asyncDuplexStreamingCall(
+ return asyncBidiStreamingCall(
channel.newCall(METHOD_FULL_DUPLEX_CALL, callOptions), responseObserver);
}
@java.lang.Override
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> halfDuplexCall(
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) {
- return asyncDuplexStreamingCall(
+ return asyncBidiStreamingCall(
channel.newCall(METHOD_HALF_DUPLEX_CALL, callOptions), responseObserver);
}
}
@@ -298,8 +298,8 @@
})))
.addMethod(io.grpc.ServerMethodDefinition.create(
METHOD_FULL_DUPLEX_CALL,
- asyncDuplexStreamingCall(
- new io.grpc.stub.ServerCalls.DuplexStreamingMethod<
+ asyncBidiStreamingCall(
+ new io.grpc.stub.ServerCalls.BidiStreamingMethod<
io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
io.grpc.testing.integration.Messages.StreamingOutputCallResponse>() {
@java.lang.Override
@@ -310,8 +310,8 @@
})))
.addMethod(io.grpc.ServerMethodDefinition.create(
METHOD_HALF_DUPLEX_CALL,
- asyncDuplexStreamingCall(
- new io.grpc.stub.ServerCalls.DuplexStreamingMethod<
+ asyncBidiStreamingCall(
+ new io.grpc.stub.ServerCalls.BidiStreamingMethod<
io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
io.grpc.testing.integration.Messages.StreamingOutputCallResponse>() {
@java.lang.Override
diff --git a/okhttp/src/test/java/io/grpc/transport/okhttp/OkHttpClientTransportTest.java b/okhttp/src/test/java/io/grpc/transport/okhttp/OkHttpClientTransportTest.java
index 479b5cb..f6c68f6 100644
--- a/okhttp/src/test/java/io/grpc/transport/okhttp/OkHttpClientTransportTest.java
+++ b/okhttp/src/test/java/io/grpc/transport/okhttp/OkHttpClientTransportTest.java
@@ -750,7 +750,7 @@
@Test
public void duplexStreamingHeadersShouldNotBeFlushed() throws Exception {
- when(method.getType()).thenReturn(MethodType.DUPLEX_STREAMING);
+ when(method.getType()).thenReturn(MethodType.BIDI_STREAMING);
shouldHeadersBeFlushed(true);
}
diff --git a/stub/src/main/java/io/grpc/stub/ClientCalls.java b/stub/src/main/java/io/grpc/stub/ClientCalls.java
index f3cf8b1..865d71c 100644
--- a/stub/src/main/java/io/grpc/stub/ClientCalls.java
+++ b/stub/src/main/java/io/grpc/stub/ClientCalls.java
@@ -87,10 +87,10 @@
}
/**
- * Executes a duplex-streaming call.
+ * Executes a bidi-streaming call.
* @return request stream observer.
*/
- public static <ReqT, RespT> StreamObserver<ReqT> asyncDuplexStreamingCall(
+ public static <ReqT, RespT> StreamObserver<ReqT> asyncBidiStreamingCall(
ClientCall<ReqT, RespT> call, StreamObserver<RespT> responseObserver) {
return asyncStreamingRequestCall(call, responseObserver, true);
}
diff --git a/stub/src/main/java/io/grpc/stub/ServerCalls.java b/stub/src/main/java/io/grpc/stub/ServerCalls.java
index 573d268..16f519a 100644
--- a/stub/src/main/java/io/grpc/stub/ServerCalls.java
+++ b/stub/src/main/java/io/grpc/stub/ServerCalls.java
@@ -76,12 +76,12 @@
}
/**
- * Creates a {@code ServerCallHandler} for a duplex streaming method of the service.
+ * Creates a {@code ServerCallHandler} for a bidi streaming method of the service.
*
* @param method an adaptor to the actual method on the service implementation.
*/
- public static <ReqT, RespT> ServerCallHandler<ReqT, RespT> asyncDuplexStreamingCall(
- final DuplexStreamingMethod<ReqT, RespT> method) {
+ public static <ReqT, RespT> ServerCallHandler<ReqT, RespT> asyncBidiStreamingCall(
+ final BidiStreamingMethod<ReqT, RespT> method) {
return asyncStreamingRequestCall(method);
}
@@ -108,7 +108,7 @@
/**
* Adaptor to a bi-directional streaming method.
*/
- public static interface DuplexStreamingMethod<ReqT, RespT>
+ public static interface BidiStreamingMethod<ReqT, RespT>
extends StreamingRequestMethod<ReqT, RespT> {
}