main.grpc.com.streamlayer.inplay.InPlayGrpc 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;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.65.1)",
comments = "Source: streamlayer/inplay/inplay.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class InPlayGrpc {
private InPlayGrpc() {}
public static final java.lang.String SERVICE_NAME = "streamlayer.inplay.InPlay";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getListSportsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ListSports",
requestType = com.streamlayer.inplay.ListSportsRequest.class,
responseType = com.streamlayer.inplay.ListSportsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getListSportsMethod() {
io.grpc.MethodDescriptor getListSportsMethod;
if ((getListSportsMethod = InPlayGrpc.getListSportsMethod) == null) {
synchronized (InPlayGrpc.class) {
if ((getListSportsMethod = InPlayGrpc.getListSportsMethod) == null) {
InPlayGrpc.getListSportsMethod = getListSportsMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSports"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.inplay.ListSportsRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.inplay.ListSportsResponse.getDefaultInstance()))
.build();
}
}
}
return getListSportsMethod;
}
private static volatile io.grpc.MethodDescriptor getLeaguesBySportMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "LeaguesBySport",
requestType = com.streamlayer.inplay.LeaguesBySportRequest.class,
responseType = com.streamlayer.inplay.LeaguesBySportResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getLeaguesBySportMethod() {
io.grpc.MethodDescriptor getLeaguesBySportMethod;
if ((getLeaguesBySportMethod = InPlayGrpc.getLeaguesBySportMethod) == null) {
synchronized (InPlayGrpc.class) {
if ((getLeaguesBySportMethod = InPlayGrpc.getLeaguesBySportMethod) == null) {
InPlayGrpc.getLeaguesBySportMethod = getLeaguesBySportMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "LeaguesBySport"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.inplay.LeaguesBySportRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.streamlayer.inplay.LeaguesBySportResponse.getDefaultInstance()))
.build();
}
}
}
return getLeaguesBySportMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static InPlayStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public InPlayStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new InPlayStub(channel, callOptions);
}
};
return InPlayStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static InPlayBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public InPlayBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new InPlayBlockingStub(channel, callOptions);
}
};
return InPlayBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static InPlayFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public InPlayFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new InPlayFutureStub(channel, callOptions);
}
};
return InPlayFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*/
default void listSports(com.streamlayer.inplay.ListSportsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSportsMethod(), responseObserver);
}
/**
*/
default void leaguesBySport(com.streamlayer.inplay.LeaguesBySportRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLeaguesBySportMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service InPlay.
*/
public static abstract class InPlayImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return InPlayGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service InPlay.
*/
public static final class InPlayStub
extends io.grpc.stub.AbstractAsyncStub {
private InPlayStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected InPlayStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new InPlayStub(channel, callOptions);
}
/**
*/
public void listSports(com.streamlayer.inplay.ListSportsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getListSportsMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void leaguesBySport(com.streamlayer.inplay.LeaguesBySportRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getLeaguesBySportMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service InPlay.
*/
public static final class InPlayBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private InPlayBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected InPlayBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new InPlayBlockingStub(channel, callOptions);
}
/**
*/
public com.streamlayer.inplay.ListSportsResponse listSports(com.streamlayer.inplay.ListSportsRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getListSportsMethod(), getCallOptions(), request);
}
/**
*/
public com.streamlayer.inplay.LeaguesBySportResponse leaguesBySport(com.streamlayer.inplay.LeaguesBySportRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getLeaguesBySportMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service InPlay.
*/
public static final class InPlayFutureStub
extends io.grpc.stub.AbstractFutureStub {
private InPlayFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected InPlayFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new InPlayFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture listSports(
com.streamlayer.inplay.ListSportsRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getListSportsMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture leaguesBySport(
com.streamlayer.inplay.LeaguesBySportRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getLeaguesBySportMethod(), getCallOptions()), request);
}
}
private static final int METHODID_LIST_SPORTS = 0;
private static final int METHODID_LEAGUES_BY_SPORT = 1;
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_LIST_SPORTS:
serviceImpl.listSports((com.streamlayer.inplay.ListSportsRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LEAGUES_BY_SPORT:
serviceImpl.leaguesBySport((com.streamlayer.inplay.LeaguesBySportRequest) 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(
getListSportsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.streamlayer.inplay.ListSportsRequest,
com.streamlayer.inplay.ListSportsResponse>(
service, METHODID_LIST_SPORTS)))
.addMethod(
getLeaguesBySportMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.streamlayer.inplay.LeaguesBySportRequest,
com.streamlayer.inplay.LeaguesBySportResponse>(
service, METHODID_LEAGUES_BY_SPORT)))
.build();
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (InPlayGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.addMethod(getListSportsMethod())
.addMethod(getLeaguesBySportMethod())
.build();
}
}
}
return result;
}
}