io.seldon.protos.CombinerGrpc Maven / Gradle / Ivy
package io.seldon.protos;
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.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.MethodDescriptor.generateFullMethodName;
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.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.0.0)",
comments = "Source: prediction.proto")
public class CombinerGrpc {
private CombinerGrpc() {}
public static final String SERVICE_NAME = "seldon.protos.Combiner";
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_AGGREGATE =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"seldon.protos.Combiner", "Aggregate"),
io.grpc.protobuf.ProtoUtils.marshaller(io.seldon.protos.PredictionProtos.SeldonMessageList.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(io.seldon.protos.PredictionProtos.SeldonMessage.getDefaultInstance()));
/**
* Creates a new async stub that supports all call types for the service
*/
public static CombinerStub newStub(io.grpc.Channel channel) {
return new CombinerStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static CombinerBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new CombinerBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
*/
public static CombinerFutureStub newFutureStub(
io.grpc.Channel channel) {
return new CombinerFutureStub(channel);
}
/**
*/
public static abstract class CombinerImplBase implements io.grpc.BindableService {
/**
*/
public void aggregate(io.seldon.protos.PredictionProtos.SeldonMessageList request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_AGGREGATE, responseObserver);
}
@java.lang.Override public io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
METHOD_AGGREGATE,
asyncUnaryCall(
new MethodHandlers<
io.seldon.protos.PredictionProtos.SeldonMessageList,
io.seldon.protos.PredictionProtos.SeldonMessage>(
this, METHODID_AGGREGATE)))
.build();
}
}
/**
*/
public static final class CombinerStub extends io.grpc.stub.AbstractStub {
private CombinerStub(io.grpc.Channel channel) {
super(channel);
}
private CombinerStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected CombinerStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new CombinerStub(channel, callOptions);
}
/**
*/
public void aggregate(io.seldon.protos.PredictionProtos.SeldonMessageList request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_AGGREGATE, getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class CombinerBlockingStub extends io.grpc.stub.AbstractStub {
private CombinerBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private CombinerBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected CombinerBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new CombinerBlockingStub(channel, callOptions);
}
/**
*/
public io.seldon.protos.PredictionProtos.SeldonMessage aggregate(io.seldon.protos.PredictionProtos.SeldonMessageList request) {
return blockingUnaryCall(
getChannel(), METHOD_AGGREGATE, getCallOptions(), request);
}
}
/**
*/
public static final class CombinerFutureStub extends io.grpc.stub.AbstractStub {
private CombinerFutureStub(io.grpc.Channel channel) {
super(channel);
}
private CombinerFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected CombinerFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new CombinerFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture aggregate(
io.seldon.protos.PredictionProtos.SeldonMessageList request) {
return futureUnaryCall(
getChannel().newCall(METHOD_AGGREGATE, getCallOptions()), request);
}
}
private static final int METHODID_AGGREGATE = 0;
private static 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 CombinerImplBase serviceImpl;
private final int methodId;
public MethodHandlers(CombinerImplBase 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_AGGREGATE:
serviceImpl.aggregate((io.seldon.protos.PredictionProtos.SeldonMessageList) 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 io.grpc.ServiceDescriptor getServiceDescriptor() {
return new io.grpc.ServiceDescriptor(SERVICE_NAME,
METHOD_AGGREGATE);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy