com.netflix.genie.proto.HeartBeatServiceGrpc Maven / Gradle / Ivy
The newest version!
package com.netflix.genie.proto;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.38.1)",
comments = "Source: genie.proto")
public final class HeartBeatServiceGrpc {
private HeartBeatServiceGrpc() {}
public static final String SERVICE_NAME = "com.netflix.genie.proto.HeartBeatService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getHeartbeatMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "heartbeat",
requestType = com.netflix.genie.proto.AgentHeartBeat.class,
responseType = com.netflix.genie.proto.ServerHeartBeat.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getHeartbeatMethod() {
io.grpc.MethodDescriptor getHeartbeatMethod;
if ((getHeartbeatMethod = HeartBeatServiceGrpc.getHeartbeatMethod) == null) {
synchronized (HeartBeatServiceGrpc.class) {
if ((getHeartbeatMethod = HeartBeatServiceGrpc.getHeartbeatMethod) == null) {
HeartBeatServiceGrpc.getHeartbeatMethod = getHeartbeatMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "heartbeat"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.netflix.genie.proto.AgentHeartBeat.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.netflix.genie.proto.ServerHeartBeat.getDefaultInstance()))
.setSchemaDescriptor(new HeartBeatServiceMethodDescriptorSupplier("heartbeat"))
.build();
}
}
}
return getHeartbeatMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static HeartBeatServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public HeartBeatServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new HeartBeatServiceStub(channel, callOptions);
}
};
return HeartBeatServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static HeartBeatServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public HeartBeatServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new HeartBeatServiceBlockingStub(channel, callOptions);
}
};
return HeartBeatServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static HeartBeatServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public HeartBeatServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new HeartBeatServiceFutureStub(channel, callOptions);
}
};
return HeartBeatServiceFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class HeartBeatServiceImplBase implements io.grpc.BindableService {
/**
*/
public io.grpc.stub.StreamObserver heartbeat(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getHeartbeatMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getHeartbeatMethod(),
io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
new MethodHandlers<
com.netflix.genie.proto.AgentHeartBeat,
com.netflix.genie.proto.ServerHeartBeat>(
this, METHODID_HEARTBEAT)))
.build();
}
}
/**
*/
public static final class HeartBeatServiceStub extends io.grpc.stub.AbstractAsyncStub {
private HeartBeatServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected HeartBeatServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new HeartBeatServiceStub(channel, callOptions);
}
/**
*/
public io.grpc.stub.StreamObserver heartbeat(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
getChannel().newCall(getHeartbeatMethod(), getCallOptions()), responseObserver);
}
}
/**
*/
public static final class HeartBeatServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private HeartBeatServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected HeartBeatServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new HeartBeatServiceBlockingStub(channel, callOptions);
}
}
/**
*/
public static final class HeartBeatServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
private HeartBeatServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected HeartBeatServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new HeartBeatServiceFutureStub(channel, callOptions);
}
}
private static final int METHODID_HEARTBEAT = 0;
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 HeartBeatServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(HeartBeatServiceImplBase 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) {
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_HEARTBEAT:
return (io.grpc.stub.StreamObserver) serviceImpl.heartbeat(
(io.grpc.stub.StreamObserver) responseObserver);
default:
throw new AssertionError();
}
}
}
private static abstract class HeartBeatServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
HeartBeatServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.netflix.genie.proto.GenieProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("HeartBeatService");
}
}
private static final class HeartBeatServiceFileDescriptorSupplier
extends HeartBeatServiceBaseDescriptorSupplier {
HeartBeatServiceFileDescriptorSupplier() {}
}
private static final class HeartBeatServiceMethodDescriptorSupplier
extends HeartBeatServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
HeartBeatServiceMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (HeartBeatServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new HeartBeatServiceFileDescriptorSupplier())
.addMethod(getHeartbeatMethod())
.build();
}
}
}
return result;
}
}