mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-05 21:17:25 +00:00
bulk code format fix (#8707)
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
//Generated by flatc compiler (version 2.0.0)
|
||||
//If you make any local changes, they will be lost
|
||||
//source: monster_test.fbs
|
||||
// Generated by flatc compiler (version 2.0.0)
|
||||
// If you make any local changes, they will be lost
|
||||
// source: monster_test.fbs
|
||||
|
||||
package MyGame.Example;
|
||||
|
||||
import com.google.flatbuffers.grpc.FlatbuffersUtils;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import static io.grpc.MethodDescriptor.generateFullMethodName;
|
||||
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
|
||||
@@ -22,446 +19,443 @@ import static io.grpc.stub.ServerCalls.asyncUnaryCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
|
||||
|
||||
/**
|
||||
*/
|
||||
@javax.annotation.Generated(
|
||||
value = "by gRPC proto compiler",
|
||||
comments = "Source: monster_test.fbs")
|
||||
import com.google.flatbuffers.grpc.FlatbuffersUtils;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/** */
|
||||
@javax.annotation.Generated(value = "by gRPC proto compiler", comments = "Source: monster_test.fbs")
|
||||
public final class MonsterStorageGrpc {
|
||||
|
||||
private MonsterStorageGrpc() {}
|
||||
|
||||
|
||||
public static final String SERVICE_NAME = "MyGame.Example.MonsterStorage";
|
||||
|
||||
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
@java.lang.Deprecated // Use {@link #getStoreMethod()} instead.
|
||||
public static final io.grpc.MethodDescriptor<MyGame.Example.Monster,
|
||||
MyGame.Example.Stat> METHOD_STORE = getStoreMethod();
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<MyGame.Example.Monster,
|
||||
MyGame.Example.Stat> getStoreMethod;
|
||||
|
||||
@java.lang.Deprecated // Use {@link #getStoreMethod()} instead.
|
||||
public static final io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
|
||||
METHOD_STORE = getStoreMethod();
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
|
||||
getStoreMethod;
|
||||
|
||||
private static volatile FlatbuffersUtils.FBExtactor<MyGame.Example.Monster> extractorOfMonster;
|
||||
|
||||
private static FlatbuffersUtils.FBExtactor<MyGame.Example.Monster> getExtractorOfMonster() {
|
||||
if (extractorOfMonster != null) return extractorOfMonster;
|
||||
synchronized (MonsterStorageGrpc.class) {
|
||||
if (extractorOfMonster != null) return extractorOfMonster;
|
||||
synchronized (MonsterStorageGrpc.class) {
|
||||
if (extractorOfMonster != null) return extractorOfMonster;
|
||||
extractorOfMonster = new FlatbuffersUtils.FBExtactor<MyGame.Example.Monster>() {
|
||||
public MyGame.Example.Monster extract (ByteBuffer buffer) {
|
||||
return MyGame.Example.Monster.getRootAsMonster(buffer);
|
||||
}
|
||||
extractorOfMonster =
|
||||
new FlatbuffersUtils.FBExtactor<MyGame.Example.Monster>() {
|
||||
public MyGame.Example.Monster extract(ByteBuffer buffer) {
|
||||
return MyGame.Example.Monster.getRootAsMonster(buffer);
|
||||
}
|
||||
};
|
||||
return extractorOfMonster;
|
||||
}
|
||||
return extractorOfMonster;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static volatile FlatbuffersUtils.FBExtactor<MyGame.Example.Stat> extractorOfStat;
|
||||
|
||||
private static FlatbuffersUtils.FBExtactor<MyGame.Example.Stat> getExtractorOfStat() {
|
||||
if (extractorOfStat != null) return extractorOfStat;
|
||||
synchronized (MonsterStorageGrpc.class) {
|
||||
if (extractorOfStat != null) return extractorOfStat;
|
||||
synchronized (MonsterStorageGrpc.class) {
|
||||
if (extractorOfStat != null) return extractorOfStat;
|
||||
extractorOfStat = new FlatbuffersUtils.FBExtactor<MyGame.Example.Stat>() {
|
||||
public MyGame.Example.Stat extract (ByteBuffer buffer) {
|
||||
return MyGame.Example.Stat.getRootAsStat(buffer);
|
||||
}
|
||||
extractorOfStat =
|
||||
new FlatbuffersUtils.FBExtactor<MyGame.Example.Stat>() {
|
||||
public MyGame.Example.Stat extract(ByteBuffer buffer) {
|
||||
return MyGame.Example.Stat.getRootAsStat(buffer);
|
||||
}
|
||||
};
|
||||
return extractorOfStat;
|
||||
}
|
||||
return extractorOfStat;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
public static io.grpc.MethodDescriptor<MyGame.Example.Monster,
|
||||
MyGame.Example.Stat> getStoreMethod() {
|
||||
public static io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
|
||||
getStoreMethod() {
|
||||
io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat> getStoreMethod;
|
||||
if ((getStoreMethod = MonsterStorageGrpc.getStoreMethod) == null) {
|
||||
synchronized (MonsterStorageGrpc.class) {
|
||||
if ((getStoreMethod = MonsterStorageGrpc.getStoreMethod) == null) {
|
||||
MonsterStorageGrpc.getStoreMethod = getStoreMethod =
|
||||
io.grpc.MethodDescriptor.<MyGame.Example.Monster, MyGame.Example.Stat>newBuilder()
|
||||
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||
.setFullMethodName(generateFullMethodName(
|
||||
"MyGame.Example.MonsterStorage", "Store"))
|
||||
.setSampledToLocalTracing(true)
|
||||
.setRequestMarshaller(FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Monster.class, getExtractorOfMonster()))
|
||||
.setResponseMarshaller(FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Stat.class, getExtractorOfStat()))
|
||||
.setSchemaDescriptor(null)
|
||||
.build();
|
||||
}
|
||||
MonsterStorageGrpc.getStoreMethod =
|
||||
getStoreMethod =
|
||||
io.grpc.MethodDescriptor.<MyGame.Example.Monster, MyGame.Example.Stat>newBuilder()
|
||||
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||
.setFullMethodName(
|
||||
generateFullMethodName("MyGame.Example.MonsterStorage", "Store"))
|
||||
.setSampledToLocalTracing(true)
|
||||
.setRequestMarshaller(
|
||||
FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Monster.class, getExtractorOfMonster()))
|
||||
.setResponseMarshaller(
|
||||
FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Stat.class, getExtractorOfStat()))
|
||||
.setSchemaDescriptor(null)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
return getStoreMethod;
|
||||
}
|
||||
}
|
||||
return getStoreMethod;
|
||||
}
|
||||
|
||||
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
@java.lang.Deprecated // Use {@link #getRetrieveMethod()} instead.
|
||||
public static final io.grpc.MethodDescriptor<MyGame.Example.Stat,
|
||||
MyGame.Example.Monster> METHOD_RETRIEVE = getRetrieveMethod();
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<MyGame.Example.Stat,
|
||||
MyGame.Example.Monster> getRetrieveMethod;
|
||||
|
||||
@java.lang.Deprecated // Use {@link #getRetrieveMethod()} instead.
|
||||
public static final io.grpc.MethodDescriptor<MyGame.Example.Stat, MyGame.Example.Monster>
|
||||
METHOD_RETRIEVE = getRetrieveMethod();
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<MyGame.Example.Stat, MyGame.Example.Monster>
|
||||
getRetrieveMethod;
|
||||
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
public static io.grpc.MethodDescriptor<MyGame.Example.Stat,
|
||||
MyGame.Example.Monster> getRetrieveMethod() {
|
||||
public static io.grpc.MethodDescriptor<MyGame.Example.Stat, MyGame.Example.Monster>
|
||||
getRetrieveMethod() {
|
||||
io.grpc.MethodDescriptor<MyGame.Example.Stat, MyGame.Example.Monster> getRetrieveMethod;
|
||||
if ((getRetrieveMethod = MonsterStorageGrpc.getRetrieveMethod) == null) {
|
||||
synchronized (MonsterStorageGrpc.class) {
|
||||
if ((getRetrieveMethod = MonsterStorageGrpc.getRetrieveMethod) == null) {
|
||||
MonsterStorageGrpc.getRetrieveMethod = getRetrieveMethod =
|
||||
io.grpc.MethodDescriptor.<MyGame.Example.Stat, MyGame.Example.Monster>newBuilder()
|
||||
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
|
||||
.setFullMethodName(generateFullMethodName(
|
||||
"MyGame.Example.MonsterStorage", "Retrieve"))
|
||||
.setSampledToLocalTracing(true)
|
||||
.setRequestMarshaller(FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Stat.class, getExtractorOfStat()))
|
||||
.setResponseMarshaller(FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Monster.class, getExtractorOfMonster()))
|
||||
.setSchemaDescriptor(null)
|
||||
.build();
|
||||
}
|
||||
MonsterStorageGrpc.getRetrieveMethod =
|
||||
getRetrieveMethod =
|
||||
io.grpc.MethodDescriptor.<MyGame.Example.Stat, MyGame.Example.Monster>newBuilder()
|
||||
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
|
||||
.setFullMethodName(
|
||||
generateFullMethodName("MyGame.Example.MonsterStorage", "Retrieve"))
|
||||
.setSampledToLocalTracing(true)
|
||||
.setRequestMarshaller(
|
||||
FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Stat.class, getExtractorOfStat()))
|
||||
.setResponseMarshaller(
|
||||
FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Monster.class, getExtractorOfMonster()))
|
||||
.setSchemaDescriptor(null)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
return getRetrieveMethod;
|
||||
}
|
||||
}
|
||||
return getRetrieveMethod;
|
||||
}
|
||||
|
||||
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
@java.lang.Deprecated // Use {@link #getGetMaxHitPointMethod()} instead.
|
||||
public static final io.grpc.MethodDescriptor<MyGame.Example.Monster,
|
||||
MyGame.Example.Stat> METHOD_GET_MAX_HIT_POINT = getGetMaxHitPointMethod();
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<MyGame.Example.Monster,
|
||||
MyGame.Example.Stat> getGetMaxHitPointMethod;
|
||||
|
||||
@java.lang.Deprecated // Use {@link #getGetMaxHitPointMethod()} instead.
|
||||
public static final io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
|
||||
METHOD_GET_MAX_HIT_POINT = getGetMaxHitPointMethod();
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
|
||||
getGetMaxHitPointMethod;
|
||||
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
public static io.grpc.MethodDescriptor<MyGame.Example.Monster,
|
||||
MyGame.Example.Stat> getGetMaxHitPointMethod() {
|
||||
public static io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
|
||||
getGetMaxHitPointMethod() {
|
||||
io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat> getGetMaxHitPointMethod;
|
||||
if ((getGetMaxHitPointMethod = MonsterStorageGrpc.getGetMaxHitPointMethod) == null) {
|
||||
synchronized (MonsterStorageGrpc.class) {
|
||||
if ((getGetMaxHitPointMethod = MonsterStorageGrpc.getGetMaxHitPointMethod) == null) {
|
||||
MonsterStorageGrpc.getGetMaxHitPointMethod = getGetMaxHitPointMethod =
|
||||
io.grpc.MethodDescriptor.<MyGame.Example.Monster, MyGame.Example.Stat>newBuilder()
|
||||
.setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
|
||||
.setFullMethodName(generateFullMethodName(
|
||||
"MyGame.Example.MonsterStorage", "GetMaxHitPoint"))
|
||||
.setSampledToLocalTracing(true)
|
||||
.setRequestMarshaller(FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Monster.class, getExtractorOfMonster()))
|
||||
.setResponseMarshaller(FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Stat.class, getExtractorOfStat()))
|
||||
.setSchemaDescriptor(null)
|
||||
.build();
|
||||
}
|
||||
MonsterStorageGrpc.getGetMaxHitPointMethod =
|
||||
getGetMaxHitPointMethod =
|
||||
io.grpc.MethodDescriptor.<MyGame.Example.Monster, MyGame.Example.Stat>newBuilder()
|
||||
.setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
|
||||
.setFullMethodName(
|
||||
generateFullMethodName("MyGame.Example.MonsterStorage", "GetMaxHitPoint"))
|
||||
.setSampledToLocalTracing(true)
|
||||
.setRequestMarshaller(
|
||||
FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Monster.class, getExtractorOfMonster()))
|
||||
.setResponseMarshaller(
|
||||
FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Stat.class, getExtractorOfStat()))
|
||||
.setSchemaDescriptor(null)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
return getGetMaxHitPointMethod;
|
||||
}
|
||||
}
|
||||
return getGetMaxHitPointMethod;
|
||||
}
|
||||
|
||||
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
@java.lang.Deprecated // Use {@link #getGetMinMaxHitPointsMethod()} instead.
|
||||
public static final io.grpc.MethodDescriptor<MyGame.Example.Monster,
|
||||
MyGame.Example.Stat> METHOD_GET_MIN_MAX_HIT_POINTS = getGetMinMaxHitPointsMethod();
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<MyGame.Example.Monster,
|
||||
MyGame.Example.Stat> getGetMinMaxHitPointsMethod;
|
||||
|
||||
@java.lang.Deprecated // Use {@link #getGetMinMaxHitPointsMethod()} instead.
|
||||
public static final io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
|
||||
METHOD_GET_MIN_MAX_HIT_POINTS = getGetMinMaxHitPointsMethod();
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
|
||||
getGetMinMaxHitPointsMethod;
|
||||
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
public static io.grpc.MethodDescriptor<MyGame.Example.Monster,
|
||||
MyGame.Example.Stat> getGetMinMaxHitPointsMethod() {
|
||||
io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat> getGetMinMaxHitPointsMethod;
|
||||
public static io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
|
||||
getGetMinMaxHitPointsMethod() {
|
||||
io.grpc.MethodDescriptor<MyGame.Example.Monster, MyGame.Example.Stat>
|
||||
getGetMinMaxHitPointsMethod;
|
||||
if ((getGetMinMaxHitPointsMethod = MonsterStorageGrpc.getGetMinMaxHitPointsMethod) == null) {
|
||||
synchronized (MonsterStorageGrpc.class) {
|
||||
if ((getGetMinMaxHitPointsMethod = MonsterStorageGrpc.getGetMinMaxHitPointsMethod) == null) {
|
||||
MonsterStorageGrpc.getGetMinMaxHitPointsMethod = getGetMinMaxHitPointsMethod =
|
||||
io.grpc.MethodDescriptor.<MyGame.Example.Monster, MyGame.Example.Stat>newBuilder()
|
||||
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
|
||||
.setFullMethodName(generateFullMethodName(
|
||||
"MyGame.Example.MonsterStorage", "GetMinMaxHitPoints"))
|
||||
.setSampledToLocalTracing(true)
|
||||
.setRequestMarshaller(FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Monster.class, getExtractorOfMonster()))
|
||||
.setResponseMarshaller(FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Stat.class, getExtractorOfStat()))
|
||||
.setSchemaDescriptor(null)
|
||||
.build();
|
||||
}
|
||||
if ((getGetMinMaxHitPointsMethod = MonsterStorageGrpc.getGetMinMaxHitPointsMethod)
|
||||
== null) {
|
||||
MonsterStorageGrpc.getGetMinMaxHitPointsMethod =
|
||||
getGetMinMaxHitPointsMethod =
|
||||
io.grpc.MethodDescriptor.<MyGame.Example.Monster, MyGame.Example.Stat>newBuilder()
|
||||
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
|
||||
.setFullMethodName(
|
||||
generateFullMethodName(
|
||||
"MyGame.Example.MonsterStorage", "GetMinMaxHitPoints"))
|
||||
.setSampledToLocalTracing(true)
|
||||
.setRequestMarshaller(
|
||||
FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Monster.class, getExtractorOfMonster()))
|
||||
.setResponseMarshaller(
|
||||
FlatbuffersUtils.marshaller(
|
||||
MyGame.Example.Stat.class, getExtractorOfStat()))
|
||||
.setSchemaDescriptor(null)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
return getGetMinMaxHitPointsMethod;
|
||||
}
|
||||
}
|
||||
return getGetMinMaxHitPointsMethod;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new async stub that supports all call types for the service
|
||||
*/
|
||||
|
||||
/** Creates a new async stub that supports all call types for the service */
|
||||
public static MonsterStorageStub newStub(io.grpc.Channel channel) {
|
||||
return new MonsterStorageStub(channel);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
|
||||
*/
|
||||
public static MonsterStorageBlockingStub newBlockingStub(
|
||||
io.grpc.Channel channel) {
|
||||
public static MonsterStorageBlockingStub newBlockingStub(io.grpc.Channel channel) {
|
||||
return new MonsterStorageBlockingStub(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new ListenableFuture-style stub that supports unary calls on the service
|
||||
*/
|
||||
public static MonsterStorageFutureStub newFutureStub(
|
||||
io.grpc.Channel channel) {
|
||||
|
||||
/** Creates a new ListenableFuture-style stub that supports unary calls on the service */
|
||||
public static MonsterStorageFutureStub newFutureStub(io.grpc.Channel channel) {
|
||||
return new MonsterStorageFutureStub(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static abstract class MonsterStorageImplBase implements io.grpc.BindableService {
|
||||
|
||||
/**
|
||||
*/
|
||||
public void store(MyGame.Example.Monster request,
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
|
||||
|
||||
/** */
|
||||
public abstract static class MonsterStorageImplBase implements io.grpc.BindableService {
|
||||
|
||||
/** */
|
||||
public void store(
|
||||
MyGame.Example.Monster request,
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
|
||||
asyncUnimplementedUnaryCall(getStoreMethod(), responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public void retrieve(MyGame.Example.Stat request,
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Monster> responseObserver) {
|
||||
|
||||
/** */
|
||||
public void retrieve(
|
||||
MyGame.Example.Stat request,
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Monster> responseObserver) {
|
||||
asyncUnimplementedUnaryCall(getRetrieveMethod(), responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMaxHitPoint(
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
|
||||
|
||||
/** */
|
||||
public io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMaxHitPoint(
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
|
||||
return asyncUnimplementedStreamingCall(getGetMaxHitPointMethod(), responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMinMaxHitPoints(
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
|
||||
|
||||
/** */
|
||||
public io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMinMaxHitPoints(
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
|
||||
return asyncUnimplementedStreamingCall(getGetMinMaxHitPointsMethod(), responseObserver);
|
||||
}
|
||||
|
||||
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
|
||||
|
||||
@java.lang.Override
|
||||
public final io.grpc.ServerServiceDefinition bindService() {
|
||||
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
||||
.addMethod(
|
||||
getStoreMethod(),
|
||||
asyncUnaryCall(
|
||||
new MethodHandlers<
|
||||
MyGame.Example.Monster,
|
||||
MyGame.Example.Stat>(
|
||||
this, METHODID_STORE)))
|
||||
getStoreMethod(),
|
||||
asyncUnaryCall(
|
||||
new MethodHandlers<MyGame.Example.Monster, MyGame.Example.Stat>(
|
||||
this, METHODID_STORE)))
|
||||
.addMethod(
|
||||
getRetrieveMethod(),
|
||||
asyncServerStreamingCall(
|
||||
new MethodHandlers<
|
||||
MyGame.Example.Stat,
|
||||
MyGame.Example.Monster>(
|
||||
this, METHODID_RETRIEVE)))
|
||||
getRetrieveMethod(),
|
||||
asyncServerStreamingCall(
|
||||
new MethodHandlers<MyGame.Example.Stat, MyGame.Example.Monster>(
|
||||
this, METHODID_RETRIEVE)))
|
||||
.addMethod(
|
||||
getGetMaxHitPointMethod(),
|
||||
asyncClientStreamingCall(
|
||||
new MethodHandlers<
|
||||
MyGame.Example.Monster,
|
||||
MyGame.Example.Stat>(
|
||||
this, METHODID_GET_MAX_HIT_POINT)))
|
||||
getGetMaxHitPointMethod(),
|
||||
asyncClientStreamingCall(
|
||||
new MethodHandlers<MyGame.Example.Monster, MyGame.Example.Stat>(
|
||||
this, METHODID_GET_MAX_HIT_POINT)))
|
||||
.addMethod(
|
||||
getGetMinMaxHitPointsMethod(),
|
||||
asyncBidiStreamingCall(
|
||||
new MethodHandlers<
|
||||
MyGame.Example.Monster,
|
||||
MyGame.Example.Stat>(
|
||||
this, METHODID_GET_MIN_MAX_HIT_POINTS)))
|
||||
getGetMinMaxHitPointsMethod(),
|
||||
asyncBidiStreamingCall(
|
||||
new MethodHandlers<MyGame.Example.Monster, MyGame.Example.Stat>(
|
||||
this, METHODID_GET_MIN_MAX_HIT_POINTS)))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class MonsterStorageStub extends io.grpc.stub.AbstractStub<MonsterStorageStub> {
|
||||
|
||||
/** */
|
||||
public static final class MonsterStorageStub
|
||||
extends io.grpc.stub.AbstractStub<MonsterStorageStub> {
|
||||
private MonsterStorageStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private MonsterStorageStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
|
||||
private MonsterStorageStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
|
||||
@java.lang.Override
|
||||
protected MonsterStorageStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
protected MonsterStorageStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||
return new MonsterStorageStub(channel, callOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public void store(MyGame.Example.Monster request,
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
|
||||
|
||||
/** */
|
||||
public void store(
|
||||
MyGame.Example.Monster request,
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
|
||||
asyncUnaryCall(
|
||||
getChannel().newCall(getStoreMethod(), getCallOptions()), request, responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public void retrieve(MyGame.Example.Stat request,
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Monster> responseObserver) {
|
||||
|
||||
/** */
|
||||
public void retrieve(
|
||||
MyGame.Example.Stat request,
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Monster> responseObserver) {
|
||||
asyncServerStreamingCall(
|
||||
getChannel().newCall(getRetrieveMethod(), getCallOptions()), request, responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMaxHitPoint(
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
|
||||
|
||||
/** */
|
||||
public io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMaxHitPoint(
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
|
||||
return asyncClientStreamingCall(
|
||||
getChannel().newCall(getGetMaxHitPointMethod(), getCallOptions()), responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMinMaxHitPoints(
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
|
||||
|
||||
/** */
|
||||
public io.grpc.stub.StreamObserver<MyGame.Example.Monster> getMinMaxHitPoints(
|
||||
io.grpc.stub.StreamObserver<MyGame.Example.Stat> responseObserver) {
|
||||
return asyncBidiStreamingCall(
|
||||
getChannel().newCall(getGetMinMaxHitPointsMethod(), getCallOptions()), responseObserver);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class MonsterStorageBlockingStub extends io.grpc.stub.AbstractStub<MonsterStorageBlockingStub> {
|
||||
|
||||
/** */
|
||||
public static final class MonsterStorageBlockingStub
|
||||
extends io.grpc.stub.AbstractStub<MonsterStorageBlockingStub> {
|
||||
private MonsterStorageBlockingStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private MonsterStorageBlockingStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
|
||||
private MonsterStorageBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
|
||||
@java.lang.Override
|
||||
protected MonsterStorageBlockingStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
protected MonsterStorageBlockingStub build(
|
||||
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||
return new MonsterStorageBlockingStub(channel, callOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public MyGame.Example.Stat store(MyGame.Example.Monster request) {
|
||||
return blockingUnaryCall(
|
||||
getChannel(), getStoreMethod(), getCallOptions(), request);
|
||||
|
||||
/** */
|
||||
public MyGame.Example.Stat store(MyGame.Example.Monster request) {
|
||||
return blockingUnaryCall(getChannel(), getStoreMethod(), getCallOptions(), request);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public java.util.Iterator<MyGame.Example.Monster> retrieve(
|
||||
MyGame.Example.Stat request) {
|
||||
|
||||
/** */
|
||||
public java.util.Iterator<MyGame.Example.Monster> retrieve(MyGame.Example.Stat request) {
|
||||
return blockingServerStreamingCall(
|
||||
getChannel(), getRetrieveMethod(), getCallOptions(), request);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class MonsterStorageFutureStub extends io.grpc.stub.AbstractStub<MonsterStorageFutureStub> {
|
||||
|
||||
/** */
|
||||
public static final class MonsterStorageFutureStub
|
||||
extends io.grpc.stub.AbstractStub<MonsterStorageFutureStub> {
|
||||
private MonsterStorageFutureStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private MonsterStorageFutureStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
|
||||
private MonsterStorageFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
|
||||
@java.lang.Override
|
||||
protected MonsterStorageFutureStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
protected MonsterStorageFutureStub build(
|
||||
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||
return new MonsterStorageFutureStub(channel, callOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public com.google.common.util.concurrent.ListenableFuture<MyGame.Example.Stat> store(
|
||||
MyGame.Example.Monster request) {
|
||||
return futureUnaryCall(
|
||||
getChannel().newCall(getStoreMethod(), getCallOptions()), request);
|
||||
|
||||
/** */
|
||||
public com.google.common.util.concurrent.ListenableFuture<MyGame.Example.Stat> store(
|
||||
MyGame.Example.Monster request) {
|
||||
return futureUnaryCall(getChannel().newCall(getStoreMethod(), getCallOptions()), request);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static final int METHODID_STORE = 0;
|
||||
private static final int METHODID_RETRIEVE = 1;
|
||||
private static final int METHODID_GET_MIN_MAX_HIT_POINTS = 2;
|
||||
private static final int METHODID_GET_MAX_HIT_POINT = 3;
|
||||
|
||||
private static final class MethodHandlers<Req, Resp> implements
|
||||
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
|
||||
|
||||
private static final class MethodHandlers<Req, Resp>
|
||||
implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
|
||||
private final MonsterStorageImplBase serviceImpl;
|
||||
private final int methodId;
|
||||
|
||||
|
||||
MethodHandlers(MonsterStorageImplBase serviceImpl, int methodId) {
|
||||
this.serviceImpl = serviceImpl;
|
||||
this.methodId = methodId;
|
||||
}
|
||||
|
||||
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("unchecked")
|
||||
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||
switch (methodId) {
|
||||
case METHODID_STORE:
|
||||
serviceImpl.store((MyGame.Example.Monster) request,
|
||||
serviceImpl.store(
|
||||
(MyGame.Example.Monster) request,
|
||||
(io.grpc.stub.StreamObserver<MyGame.Example.Stat>) responseObserver);
|
||||
break;
|
||||
case METHODID_RETRIEVE:
|
||||
serviceImpl.retrieve((MyGame.Example.Stat) request,
|
||||
serviceImpl.retrieve(
|
||||
(MyGame.Example.Stat) request,
|
||||
(io.grpc.stub.StreamObserver<MyGame.Example.Monster>) responseObserver);
|
||||
break;
|
||||
default:
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("unchecked")
|
||||
public io.grpc.stub.StreamObserver<Req> invoke(
|
||||
io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||
switch (methodId) {
|
||||
case METHODID_GET_MAX_HIT_POINT:
|
||||
return (io.grpc.stub.StreamObserver<Req>) serviceImpl.getMaxHitPoint(
|
||||
(io.grpc.stub.StreamObserver<MyGame.Example.Stat>) responseObserver);
|
||||
return (io.grpc.stub.StreamObserver<Req>)
|
||||
serviceImpl.getMaxHitPoint(
|
||||
(io.grpc.stub.StreamObserver<MyGame.Example.Stat>) responseObserver);
|
||||
case METHODID_GET_MIN_MAX_HIT_POINTS:
|
||||
return (io.grpc.stub.StreamObserver<Req>) serviceImpl.getMinMaxHitPoints(
|
||||
(io.grpc.stub.StreamObserver<MyGame.Example.Stat>) responseObserver);
|
||||
return (io.grpc.stub.StreamObserver<Req>)
|
||||
serviceImpl.getMinMaxHitPoints(
|
||||
(io.grpc.stub.StreamObserver<MyGame.Example.Stat>) responseObserver);
|
||||
default:
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
|
||||
|
||||
|
||||
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
|
||||
io.grpc.ServiceDescriptor result = serviceDescriptor;
|
||||
if (result == null) {
|
||||
synchronized (MonsterStorageGrpc.class) {
|
||||
result = serviceDescriptor;
|
||||
if (result == null) {
|
||||
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
|
||||
.setSchemaDescriptor(null)
|
||||
.addMethod(getStoreMethod())
|
||||
.addMethod(getRetrieveMethod())
|
||||
.addMethod(getGetMaxHitPointMethod())
|
||||
.addMethod(getGetMinMaxHitPointsMethod())
|
||||
.build();
|
||||
serviceDescriptor =
|
||||
result =
|
||||
io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
|
||||
.setSchemaDescriptor(null)
|
||||
.addMethod(getStoreMethod())
|
||||
.addMethod(getRetrieveMethod())
|
||||
.addMethod(getGetMaxHitPointMethod())
|
||||
.addMethod(getGetMinMaxHitPointsMethod())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,12 @@ package MyGame.Example
|
||||
|
||||
@Suppress("unused")
|
||||
class TestEnum private constructor() {
|
||||
companion object {
|
||||
const val A: Byte = 0
|
||||
const val B: Byte = 1
|
||||
const val C: Byte = 2
|
||||
val names : Array<String> = arrayOf("A", "B", "C")
|
||||
fun name(e: Int) : String = names[e]
|
||||
}
|
||||
companion object {
|
||||
const val A: Byte = 0
|
||||
const val B: Byte = 1
|
||||
const val C: Byte = 2
|
||||
val names: Array<String> = arrayOf("A", "B", "C")
|
||||
|
||||
fun name(e: Int): String = names[e]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,52 +3,44 @@ import grpc
|
||||
|
||||
|
||||
class MonsterStorageStub(object):
|
||||
|
||||
|
||||
def __init__(self, channel):
|
||||
"""Constructor.
|
||||
|
||||
|
||||
Args:
|
||||
channel: A grpc.Channel.
|
||||
"""
|
||||
self.Store = channel.unary_unary(
|
||||
'/MyGame.Example.MonsterStorage/Store',
|
||||
|
||||
|
||||
)
|
||||
)
|
||||
self.Retrieve = channel.unary_stream(
|
||||
'/MyGame.Example.MonsterStorage/Retrieve',
|
||||
|
||||
|
||||
)
|
||||
)
|
||||
self.GetMaxHitPoint = channel.stream_unary(
|
||||
'/MyGame.Example.MonsterStorage/GetMaxHitPoint',
|
||||
|
||||
|
||||
)
|
||||
)
|
||||
self.GetMinMaxHitPoints = channel.unary_unary(
|
||||
'/MyGame.Example.MonsterStorage/GetMinMaxHitPoints',
|
||||
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
class MonsterStorageServicer(object):
|
||||
|
||||
|
||||
def Store(self, request, context):
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
|
||||
def Retrieve(self, request, context):
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
|
||||
def GetMaxHitPoint(self, request_iterator, context):
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
|
||||
def GetMinMaxHitPoints(self, request, context):
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
@@ -59,28 +51,23 @@ def add_MonsterStorageServicer_to_server(servicer, server):
|
||||
rpc_method_handlers = {
|
||||
'Store': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.Store,
|
||||
|
||||
|
||||
),
|
||||
'Retrieve': grpc.unary_stream_rpc_method_handler(
|
||||
servicer.Retrieve,
|
||||
|
||||
|
||||
),
|
||||
'GetMaxHitPoint': grpc.stream_unary_rpc_method_handler(
|
||||
servicer.GetMaxHitPoint,
|
||||
|
||||
|
||||
),
|
||||
'GetMinMaxHitPoints': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.GetMinMaxHitPoints,
|
||||
|
||||
|
||||
),
|
||||
}
|
||||
generic_handler = grpc.method_handlers_generic_handler(
|
||||
'MyGame.Example.MonsterStorage', rpc_method_handlers)
|
||||
'MyGame.Example.MonsterStorage', rpc_method_handlers
|
||||
)
|
||||
server.add_generic_rpc_handlers((generic_handler,))
|
||||
|
||||
|
||||
try:
|
||||
# THESE ELEMENTS WILL BE DEPRECATED.
|
||||
# Please use the generated *_pb2_grpc.py files instead.
|
||||
@@ -89,153 +76,212 @@ try:
|
||||
from grpc.beta import interfaces as beta_interfaces
|
||||
from grpc.framework.common import cardinality
|
||||
from grpc.framework.interfaces.face import utilities as face_utilities
|
||||
|
||||
|
||||
|
||||
class MonsterStorageStub(object):
|
||||
|
||||
|
||||
def __init__(self, channel):
|
||||
"""Constructor.
|
||||
|
||||
|
||||
Args:
|
||||
channel: A grpc.Channel.
|
||||
"""
|
||||
self.Store = channel.unary_unary(
|
||||
'/MyGame.Example.MonsterStorage/Store',
|
||||
|
||||
|
||||
)
|
||||
)
|
||||
self.Retrieve = channel.unary_stream(
|
||||
'/MyGame.Example.MonsterStorage/Retrieve',
|
||||
|
||||
|
||||
)
|
||||
)
|
||||
self.GetMaxHitPoint = channel.stream_unary(
|
||||
'/MyGame.Example.MonsterStorage/GetMaxHitPoint',
|
||||
|
||||
|
||||
)
|
||||
)
|
||||
self.GetMinMaxHitPoints = channel.unary_unary(
|
||||
'/MyGame.Example.MonsterStorage/GetMinMaxHitPoints',
|
||||
|
||||
|
||||
)
|
||||
|
||||
|
||||
)
|
||||
|
||||
class MonsterStorageServicer(object):
|
||||
|
||||
|
||||
def Store(self, request, context):
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
|
||||
def Retrieve(self, request, context):
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
|
||||
def GetMaxHitPoint(self, request_iterator, context):
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
|
||||
def GetMinMaxHitPoints(self, request, context):
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
|
||||
|
||||
def add_MonsterStorageServicer_to_server(servicer, server):
|
||||
rpc_method_handlers = {
|
||||
'Store': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.Store,
|
||||
|
||||
|
||||
),
|
||||
'Retrieve': grpc.unary_stream_rpc_method_handler(
|
||||
servicer.Retrieve,
|
||||
|
||||
|
||||
),
|
||||
'GetMaxHitPoint': grpc.stream_unary_rpc_method_handler(
|
||||
servicer.GetMaxHitPoint,
|
||||
|
||||
|
||||
),
|
||||
'GetMinMaxHitPoints': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.GetMinMaxHitPoints,
|
||||
|
||||
|
||||
),
|
||||
}
|
||||
generic_handler = grpc.method_handlers_generic_handler(
|
||||
'MyGame.Example.MonsterStorage', rpc_method_handlers)
|
||||
'MyGame.Example.MonsterStorage', rpc_method_handlers
|
||||
)
|
||||
server.add_generic_rpc_handlers((generic_handler,))
|
||||
|
||||
|
||||
|
||||
class BetaMonsterStorageServicer(object):
|
||||
"""The Beta API is deprecated for 0.15.0 and later.
|
||||
|
||||
|
||||
It is recommended to use the GA API (classes and functions in this
|
||||
file not marked beta) for all further purposes. This class was generated
|
||||
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
|
||||
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.
|
||||
"""
|
||||
|
||||
def Store(self, request, context):
|
||||
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
|
||||
|
||||
def Retrieve(self, request, context):
|
||||
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
|
||||
|
||||
def GetMaxHitPoint(self, request_iterator, context):
|
||||
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
|
||||
|
||||
def GetMinMaxHitPoints(self, request, context):
|
||||
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
|
||||
|
||||
|
||||
|
||||
class BetaMonsterStorageStub(object):
|
||||
"""The Beta API is deprecated for 0.15.0 and later.
|
||||
|
||||
|
||||
It is recommended to use the GA API (classes and functions in this
|
||||
file not marked beta) for all further purposes. This class was generated
|
||||
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
|
||||
def Store(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
|
||||
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.
|
||||
"""
|
||||
|
||||
def Store(
|
||||
self,
|
||||
request,
|
||||
timeout,
|
||||
metadata=None,
|
||||
with_call=False,
|
||||
protocol_options=None,
|
||||
):
|
||||
raise NotImplementedError()
|
||||
|
||||
Store.future = None
|
||||
def Retrieve(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
|
||||
|
||||
def Retrieve(
|
||||
self,
|
||||
request,
|
||||
timeout,
|
||||
metadata=None,
|
||||
with_call=False,
|
||||
protocol_options=None,
|
||||
):
|
||||
raise NotImplementedError()
|
||||
def GetMaxHitPoint(self, request_iterator, timeout, metadata=None, with_call=False, protocol_options=None):
|
||||
|
||||
def GetMaxHitPoint(
|
||||
self,
|
||||
request_iterator,
|
||||
timeout,
|
||||
metadata=None,
|
||||
with_call=False,
|
||||
protocol_options=None,
|
||||
):
|
||||
raise NotImplementedError()
|
||||
|
||||
GetMaxHitPoint.future = None
|
||||
def GetMinMaxHitPoints(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
|
||||
|
||||
def GetMinMaxHitPoints(
|
||||
self,
|
||||
request,
|
||||
timeout,
|
||||
metadata=None,
|
||||
with_call=False,
|
||||
protocol_options=None,
|
||||
):
|
||||
raise NotImplementedError()
|
||||
|
||||
GetMinMaxHitPoints.future = None
|
||||
|
||||
|
||||
def beta_create_MonsterStorage_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
|
||||
|
||||
def beta_create_MonsterStorage_server(
|
||||
servicer,
|
||||
pool=None,
|
||||
pool_size=None,
|
||||
default_timeout=None,
|
||||
maximum_timeout=None,
|
||||
):
|
||||
"""The Beta API is deprecated for 0.15.0 and later.
|
||||
|
||||
|
||||
It is recommended to use the GA API (classes and functions in this
|
||||
file not marked beta) for all further purposes. This function was
|
||||
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
|
||||
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0
|
||||
"""
|
||||
method_implementations = {
|
||||
('MyGame.Example.MonsterStorage', 'GetMaxHitPoint'): face_utilities.stream_unary_inline(servicer.GetMaxHitPoint),
|
||||
('MyGame.Example.MonsterStorage', 'GetMinMaxHitPoints'): face_utilities.unary_unary_inline(servicer.GetMinMaxHitPoints),
|
||||
('MyGame.Example.MonsterStorage', 'Retrieve'): face_utilities.unary_stream_inline(servicer.Retrieve),
|
||||
('MyGame.Example.MonsterStorage', 'Store'): face_utilities.unary_unary_inline(servicer.Store),
|
||||
(
|
||||
'MyGame.Example.MonsterStorage',
|
||||
'GetMaxHitPoint',
|
||||
): face_utilities.stream_unary_inline(servicer.GetMaxHitPoint),
|
||||
(
|
||||
'MyGame.Example.MonsterStorage',
|
||||
'GetMinMaxHitPoints',
|
||||
): face_utilities.unary_unary_inline(servicer.GetMinMaxHitPoints),
|
||||
(
|
||||
'MyGame.Example.MonsterStorage',
|
||||
'Retrieve',
|
||||
): face_utilities.unary_stream_inline(servicer.Retrieve),
|
||||
(
|
||||
'MyGame.Example.MonsterStorage',
|
||||
'Store',
|
||||
): face_utilities.unary_unary_inline(servicer.Store),
|
||||
}
|
||||
server_options = beta_implementations.server_options(thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
|
||||
return beta_implementations.server(method_implementations, options=server_options)
|
||||
|
||||
|
||||
def beta_create_MonsterStorage_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
|
||||
server_options = beta_implementations.server_options(
|
||||
thread_pool=pool,
|
||||
thread_pool_size=pool_size,
|
||||
default_timeout=default_timeout,
|
||||
maximum_timeout=maximum_timeout,
|
||||
)
|
||||
return beta_implementations.server(
|
||||
method_implementations, options=server_options
|
||||
)
|
||||
|
||||
def beta_create_MonsterStorage_stub(
|
||||
channel, host=None, metadata_transformer=None, pool=None, pool_size=None
|
||||
):
|
||||
"""The Beta API is deprecated for 0.15.0 and later.
|
||||
|
||||
|
||||
It is recommended to use the GA API (classes and functions in this
|
||||
file not marked beta) for all further purposes. This function was
|
||||
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
|
||||
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0
|
||||
"""
|
||||
cardinalities = {
|
||||
'GetMaxHitPoint': cardinality.Cardinality.STREAM_UNARY,
|
||||
'GetMinMaxHitPoints': cardinality.Cardinality.UNARY_UNARY,
|
||||
'Retrieve': cardinality.Cardinality.UNARY_STREAM,
|
||||
'Store': cardinality.Cardinality.UNARY_UNARY,
|
||||
'GetMaxHitPoint': cardinality.Cardinality.STREAM_UNARY,
|
||||
'GetMinMaxHitPoints': cardinality.Cardinality.UNARY_UNARY,
|
||||
'Retrieve': cardinality.Cardinality.UNARY_STREAM,
|
||||
'Store': cardinality.Cardinality.UNARY_UNARY,
|
||||
}
|
||||
stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, thread_pool=pool, thread_pool_size=pool_size)
|
||||
return beta_implementations.dynamic_stub(channel, 'MyGame.Example.MonsterStorage', cardinalities, options=stub_options)
|
||||
stub_options = beta_implementations.stub_options(
|
||||
host=host,
|
||||
metadata_transformer=metadata_transformer,
|
||||
thread_pool=pool,
|
||||
thread_pool_size=pool_size,
|
||||
)
|
||||
return beta_implementations.dynamic_stub(
|
||||
channel,
|
||||
'MyGame.Example.MonsterStorage',
|
||||
cardinalities,
|
||||
options=stub_options,
|
||||
)
|
||||
|
||||
except ImportError:
|
||||
pass
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user