main.grpc.com.streamlayer.inplay.bets.BetsGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sl-protofiles Show documentation
Show all versions of sl-protofiles Show documentation
StreamLayer Java Protofiles
package com.streamlayer.inplay.bets;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.65.1)",
comments = "Source: streamlayer/inplay/bets/inplay.bets.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class BetsGrpc {
private BetsGrpc() {}
public static final java.lang.String SERVICE_NAME = "streamlayer.inplay.bets.Bets";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getPlaceMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Place",
requestType = com.streamlayer.inplay.bets.PlaceRequest.class,
responseType = com.streamlayer.inplay.bets.PlaceResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getPlaceMethod() {
io.grpc.MethodDescriptor getPlaceMethod;
if ((getPlaceMethod = BetsGrpc.getPlaceMethod) == null) {
synchronized (BetsGrpc.class) {
if ((getPlaceMethod = BetsGrpc.getPlaceMethod) == null) {
BetsGrpc.getPlaceMethod = getPlaceMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Place"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.inplay.bets.PlaceRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.inplay.bets.PlaceResponse.getDefaultInstance()))
.build();
}
}
}
return getPlaceMethod;
}
private static volatile io.grpc.MethodDescriptor getConfirmMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Confirm",
requestType = com.streamlayer.inplay.bets.ConfirmRequest.class,
responseType = com.streamlayer.inplay.bets.ConfirmResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getConfirmMethod() {
io.grpc.MethodDescriptor getConfirmMethod;
if ((getConfirmMethod = BetsGrpc.getConfirmMethod) == null) {
synchronized (BetsGrpc.class) {
if ((getConfirmMethod = BetsGrpc.getConfirmMethod) == null) {
BetsGrpc.getConfirmMethod = getConfirmMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Confirm"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.inplay.bets.ConfirmRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.inplay.bets.ConfirmResponse.getDefaultInstance()))
.build();
}
}
}
return getConfirmMethod;
}
private static volatile io.grpc.MethodDescriptor getListMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "List",
requestType = com.streamlayer.inplay.bets.ListRequest.class,
responseType = com.streamlayer.inplay.bets.ListResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getListMethod() {
io.grpc.MethodDescriptor getListMethod;
if ((getListMethod = BetsGrpc.getListMethod) == null) {
synchronized (BetsGrpc.class) {
if ((getListMethod = BetsGrpc.getListMethod) == null) {
BetsGrpc.getListMethod = getListMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "List"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.inplay.bets.ListRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.inplay.bets.ListResponse.getDefaultInstance()))
.build();
}
}
}
return getListMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static BetsStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public BetsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new BetsStub(channel, callOptions);
}
};
return BetsStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static BetsBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public BetsBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new BetsBlockingStub(channel, callOptions);
}
};
return BetsBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static BetsFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public BetsFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new BetsFutureStub(channel, callOptions);
}
};
return BetsFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*/
default void place(com.streamlayer.inplay.bets.PlaceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPlaceMethod(), responseObserver);
}
/**
*/
default void confirm(com.streamlayer.inplay.bets.ConfirmRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getConfirmMethod(), responseObserver);
}
/**
*/
default void list(com.streamlayer.inplay.bets.ListRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service Bets.
*/
public static abstract class BetsImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return BetsGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service Bets.
*/
public static final class BetsStub
extends io.grpc.stub.AbstractAsyncStub {
private BetsStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected BetsStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new BetsStub(channel, callOptions);
}
/**
*/
public void place(com.streamlayer.inplay.bets.PlaceRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getPlaceMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void confirm(com.streamlayer.inplay.bets.ConfirmRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getConfirmMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void list(com.streamlayer.inplay.bets.ListRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getListMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service Bets.
*/
public static final class BetsBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private BetsBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected BetsBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new BetsBlockingStub(channel, callOptions);
}
/**
*/
public com.streamlayer.inplay.bets.PlaceResponse place(com.streamlayer.inplay.bets.PlaceRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getPlaceMethod(), getCallOptions(), request);
}
/**
*/
public com.streamlayer.inplay.bets.ConfirmResponse confirm(com.streamlayer.inplay.bets.ConfirmRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getConfirmMethod(), getCallOptions(), request);
}
/**
*/
public com.streamlayer.inplay.bets.ListResponse list(com.streamlayer.inplay.bets.ListRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getListMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service Bets.
*/
public static final class BetsFutureStub
extends io.grpc.stub.AbstractFutureStub {
private BetsFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected BetsFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new BetsFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture place(
com.streamlayer.inplay.bets.PlaceRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getPlaceMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture confirm(
com.streamlayer.inplay.bets.ConfirmRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getConfirmMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture list(
com.streamlayer.inplay.bets.ListRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getListMethod(), getCallOptions()), request);
}
}
private static final int METHODID_PLACE = 0;
private static final int METHODID_CONFIRM = 1;
private static final int METHODID_LIST = 2;
private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final AsyncService serviceImpl;
private final int methodId;
MethodHandlers(AsyncService 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 responseObserver) {
switch (methodId) {
case METHODID_PLACE:
serviceImpl.place((com.streamlayer.inplay.bets.PlaceRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_CONFIRM:
serviceImpl.confirm((com.streamlayer.inplay.bets.ConfirmRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LIST:
serviceImpl.list((com.streamlayer.inplay.bets.ListRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getPlaceMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.streamlayer.inplay.bets.PlaceRequest,
com.streamlayer.inplay.bets.PlaceResponse>(
service, METHODID_PLACE)))
.addMethod(
getConfirmMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.streamlayer.inplay.bets.ConfirmRequest,
com.streamlayer.inplay.bets.ConfirmResponse>(
service, METHODID_CONFIRM)))
.addMethod(
getListMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.streamlayer.inplay.bets.ListRequest,
com.streamlayer.inplay.bets.ListResponse>(
service, METHODID_LIST)))
.build();
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (BetsGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.addMethod(getPlaceMethod())
.addMethod(getConfirmMethod())
.addMethod(getListMethod())
.build();
}
}
}
return result;
}
}