8000 Bidi Blocking Stub (#10318) · grpc/grpc-java@ea8c31c · GitHub
[go: up one dir, main page]

Skip to content

Commit ea8c31c

Browse files
authored
Bidi Blocking Stub (#10318)
1 parent 7b29111 commit ea8c31c

File tree

56 files changed

+4390
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+4390
-30
lines changed

alts/src/generated/main/grpc/io/grpc/alts/internal/HandshakerServiceGrpc.java

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,21 @@ public HandshakerServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOption
6060
return HandshakerServiceStub.newStub(factory, channel);
6161
}
6262

63+
/**
64+
* Creates a new blocking-style stub that supports all types of calls on the service
65+
*/
66+
public static HandshakerServiceBlockingV2Stub newBlockingV2Stub(
67+
io.grpc.Channel channel) {
68+
io.grpc.stub.AbstractStub.StubFactory<HandshakerServiceBlockingV2Stub> factory =
69+
new io.grpc.stub.AbstractStub.StubFactory<HandshakerServiceBlockingV2Stub>() {
70+
@java.lang.Override
71+
public HandshakerServiceBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
72+
return new HandshakerServiceBlockingV2Stub(channel, callOptions);
73+
}
74+
};
75+
return HandshakerServiceBlockingV2Stub.newStub(factory, channel);
76+
}
77+
6378
/**
6479
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
6580
*/
@@ -157,6 +172,40 @@ public io.grpc.stub.StreamObserver<io.grpc.alts.internal.HandshakerReq> doHandsh
157172
/**
158173
* A stub to allow clients to do synchronous rpc calls to service HandshakerService.
159174
*/
175+
public static final class HandshakerServiceBlockingV2Stub
176+
extends io.grpc.stub.AbstractBlockingStub<HandshakerServiceBlockingV2Stub> {
177+
private HandshakerServiceBlockingV2Stub(
178+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
179+
super(channel, callOptions);
180+
}
181+
182+
@java.lang.Override
183+
protected HandshakerServiceBlockingV2Stub build(
184+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
185+
return new HandshakerServiceBlockingV2Stub(channel, callOptions);
186+
}
187+
188+
/**
189+
* <pre>
190+
* Handshaker service accepts a stream of handshaker request, returning a
191+
* stream of handshaker response. Client is expected to send exactly one
192+
* message with either client_start or server_start followed by one or more
193+
* messages with next. Each time client sends a request, the handshaker
194+
* service expects to respond. Client does not have to wait for service's
195+
* response before sending next request.
196+
* </pre>
197+
*/
198+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
199+
public io.grpc.stub.BlockingClientCall<io.grpc.alts.internal.HandshakerReq, io.grpc.alts.internal.HandshakerResp>
200+
doHandshake() {
201+
return io.grpc.stub.ClientCalls.blockingBidiStreamingCall(
202+
getChannel(), getDoHandshakeMethod(), getCallOptions());
203+
}
204+
}
205+
206+
/**
207+
* A stub to allow clients to do llimited synchronous rpc calls to service HandshakerService.
208+
*/
160209
public static final class HandshakerServiceBlockingStub
161210
extends io.grpc.stub.AbstractBlockingStub<HandshakerServiceBlockingStub> {
162211
private HandshakerServiceBlockingStub(

android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/LoadBalancerStatsServiceGrpc.java

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,21 @@ public LoadBalancerStatsServiceStub newStub(io.grpc.Channel channel, io.grpc.Cal
9292
return LoadBalancerStatsServiceStub.newStub(factory, channel);
9393
}
9494

95+
/**
96+
* Creates a new blocking-style stub that supports all types of calls on the service
97+
*/
98+
public static LoadBalancerStatsServiceBlockingV2Stub newBlockingV2Stub(
99+
io.grpc.Channel channel) {
100+
io.grpc.stub.AbstractStub.StubFactory<LoadBalancerStatsServiceBlockingV2Stub> factory =
101+
new io.grpc.stub.AbstractStub.StubFactory<LoadBalancerStatsServiceBlockingV2Stub>() {
102+
@java.lang.Override
103+
public LoadBalancerStatsServiceBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
104+
return new LoadBalancerStatsServiceBlockingV2Stub(channel, callOptions);
105+
}
106+
};
107+
return LoadBalancerStatsServiceBlockingV2Stub.newStub(factory, channel);
108+
}
109+
95110
/**
96111
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
97112
*/
@@ -212,6 +227,46 @@ public void getClientAccumulatedStats(io.grpc.testing.integration.Messages.LoadB
212227
* A service used to obtain stats for verifying LB behavior.
213228
* </pre>
214229
*/
230+
public static final class LoadBalancerStatsServiceBlockingV2Stub
231+
extends io.grpc.stub.AbstractBlockingStub<LoadBalancerStatsServiceBlockingV2Stub> {
232+
private LoadBalancerStatsServiceBlockingV2Stub(
233+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
234+
super(channel, callOptions);
235+
}
236+
237+
@java.lang.Override
238+
protected LoadBalancerStatsServiceBlockingV2Stub build(
239+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
240+
return new LoadBalancerStatsServiceBlockingV2Stub(channel, callOptions);
241+
}
242+
243+
/**
244+
* <pre>
245+
* Gets the backend distribution for RPCs sent by a test client.
246+
* </pre>
247+
*/
248+
public io.grpc.testing.integration.Messages.LoadBalancerStatsResponse getClientStats(io.grpc.testing.integration.Messages.LoadBalancerStatsRequest request) {
249+
return io.grpc.stub.ClientCalls.blockingUnaryCall(
250+
getChannel(), getGetClientStatsMethod(), getCallOptions(), request);
251+
}
252+
253+
/**
254+
* <pre>
255+
* Gets the accumulated stats for RPCs sent by a test client.
256+
* </pre>
257+
*/
258+
public io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse getClientAccumulatedStats(io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest request) {
259+
return io.grpc.stub.ClientCalls.blockingUnaryCall(
260+
getChannel(), getGetClientAccumulatedStatsMethod(), getCallOptions(), request);
261+
}
262+
}
263+
264+
/**
265+
* A stub to allow clients to do llimited synchronous rpc calls to service LoadBalancerStatsService.
266+
* <pre>
267+
* A service used to obtain stats for verifying LB behavior.
268+
* </pre>
269+
*/
215270
public static final class LoadBalancerStatsServiceBlockingStub
216271
extends io.grpc.stub.AbstractBlockingStub<LoadBalancerStatsServiceBlockingStub> {
217272
private LoadBalancerStatsServiceBlockingStub(

android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,21 @@ public MetricsServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions c
8989
return MetricsServiceStub.newStub(factory, channel);
9090
}
9191

92+
/**
93+
* Creates a new blocking-style stub that supports all types of calls on the service
94+
*/
95+
public static MetricsServiceBlockingV2Stub newBlockingV2Stub(
96+
io.grpc.Channel channel) {
97+
io.grpc.stub.AbstractStub.StubFactory<MetricsServiceBlockingV2Stub> factory =
98+
new io.grpc.stub.AbstractStub.StubFactory<MetricsServiceBlockingV2Stub>() {
99+
@java.lang.Override
100+
public MetricsServiceBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
101+
return new MetricsServiceBlockingV2Stub(channel, callOptions);
102+
}
103+
};
104+
return MetricsServiceBlockingV2Stub.newStub(factory, channel);
105+
}
106+
92107
/**
93108
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
94109
*/
@@ -199,6 +214,46 @@ public void getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request,
199214
/**
200215
* A stub to allow clients to do synchronous rpc calls to service MetricsService.
201216
*/
217+
public static final class MetricsServiceBlockingV2Stub
218+
extends io.grpc.stub.AbstractBlockingStub<MetricsServiceBlockingV2Stub> {
219+
private MetricsServiceBlockingV2Stub(
220+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
221+
super(channel, callOptions);
222+
}
223+
224+
@java.lang.Override
225+
protected MetricsServiceBlockingV2Stub build(
226+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
227+
return new MetricsServiceBlockingV2Stub(channel, callOptions);
228+
}
229+
230+
/**
231+
* <pre>
232+
* Returns the values of all the gauges that are currently being maintained by
233+
* the service
234+
* </pre>
235+
*/
236+
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
237+
public io.grpc.stub.BlockingClientCall<?, io.grpc.testing.integration.Metrics.GaugeResponse>
238+
getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage request) {
239+
return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall(
240+
getChannel(), getGetAllGaugesMethod(), getCallOptions(), request);
241+
}
242+
243+
/**
244+
* <pre>
245+
* Returns the value of one gauge
246+
* </pre>
247+
*/
248+
public io.grpc.testing.integration.Metrics.GaugeResponse getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request) {
249+
return io.grpc.stub.ClientCalls.blockingUnaryCall(
250+
getChannel(), getGetGaugeMethod(), getCallOptions(), request);
251+
}
252+
}
253+
254+
/**
255+
* A stub to allow clients to do llimited synchronous rpc calls to service MetricsService.
256+
*/
202257
public static final class MetricsServiceBlockingStub
203258
extends io.grpc.stub.AbstractBlockingStub<MetricsServiceBlockingStub> {
204259
private MetricsServiceBlockingStub(

android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,21 @@ public ReconnectServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions
9292
return ReconnectServiceStub.newStub(factory, channel);
9393
}
9494

95+
/**
96+
* Creates a new blocking-style stub that supports all types of calls on the service
97+
*/
98+
public static ReconnectServiceBlockingV2Stub newBlockingV2Stub(
99+
io.grpc.Channel channel) {
100+
io.grpc.stub.AbstractStub.StubFactory<ReconnectServiceBlockingV2Stub> factory =
101+
new io.grpc.stub.AbstractStub.StubFactory<ReconnectServiceBlockingV2Stub>() {
102+
@java.lang.Override
103+
public ReconnectServiceBlockingV2Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
104+
return new ReconnectServiceBlockingV2Stub(channel, callOptions);
105+
}
106+
};
107+
return ReconnectServiceBlockingV2Stub.newStub(factory, channel);
108+
}
109+
95110
/**
96111
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
97112
*/
@@ -200,6 +215,40 @@ public void stop(io.grpc.testing.integration.EmptyProtos.Empty request,
200215
* A service used to control reconnect server.
201216
* </pre>
202217
*/
218+
public static final class ReconnectServiceBlockingV2Stub
219+
extends io.grpc.stub.AbstractBlockingStub<ReconnectServiceBlockingV2Stub> {
220+
private ReconnectServiceBlockingV2Stub(
221+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
222+
super(channel, callOptions);
223+
}
224+
225+
@java.lang.Override
226+
protected ReconnectServiceBlockingV2Stub build(
227+
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
228+
return new ReconnectServiceBlockingV2Stub(channel, callOptions);
229+
}
230+
231+
/**
232+
*/
233+
public io.grpc.testing.integration.EmptyProtos.Empty start(io.grpc.testing.integration.Messages.ReconnectParams request) {
234+
return io.grpc.stub.ClientCalls.blockingUnaryCall(
235+
getChannel(), getStartMethod(), getCallOptions(), request);
236+
}
237+
238+
/**
239+
*/
240+
public io.grpc.testing.integration.Messages.ReconnectInfo stop(io.grpc.testing.integration.EmptyProtos.Empty request) {
241+
return io.grpc.stub.ClientCalls.blockingUnaryCall(
242+
getChannel(), getStopMethod(), getCallOptions(), request);
243+
}
244+
}
245+
246+
/**
247+
* A stub to allow clients to do llimited synchronous rpc calls to service ReconnectService.
248+
* <pre>
249+
* A service used to control reconnect server.
250+
* </pre>
251+
*/
203252
public static final class ReconnectServiceBlockingStub
204253
extends io.grpc.stub.AbstractBlockingStub<ReconnectServiceBlockingStub> {
205254
private ReconnectServiceBlockingStub(

0 commit comments

Comments
 (0)
0