![JAR search and dependency download from the Maven repository](/logo.png)
logproto.PusherGrpc Maven / Gradle / Ivy
package logproto;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.35.0)",
comments = "Source: logproto.proto")
public final class PusherGrpc {
private PusherGrpc() {}
public static final String SERVICE_NAME = "logproto.Pusher";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getPushMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Push",
requestType = logproto.Logproto.PushRequest.class,
responseType = logproto.Logproto.PushResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getPushMethod() {
io.grpc.MethodDescriptor getPushMethod;
if ((getPushMethod = PusherGrpc.getPushMethod) == null) {
synchronized (PusherGrpc.class) {
if ((getPushMethod = PusherGrpc.getPushMethod) == null) {
PusherGrpc.getPushMethod = getPushMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Push"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
logproto.Logproto.PushRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
logproto.Logproto.PushResponse.getDefaultInstance()))
.setSchemaDescriptor(new PusherMethodDescriptorSupplier("Push"))
.build();
}
}
}
return getPushMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static PusherStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public PusherStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PusherStub(channel, callOptions);
}
};
return PusherStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static PusherBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public PusherBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PusherBlockingStub(channel, callOptions);
}
};
return PusherBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static PusherFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public PusherFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PusherFutureStub(channel, callOptions);
}
};
return PusherFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class PusherImplBase implements io.grpc.BindableService {
/**
*/
public void push(logproto.Logproto.PushRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPushMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getPushMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
logproto.Logproto.PushRequest,
logproto.Logproto.PushResponse>(
this, METHODID_PUSH)))
.build();
}
}
/**
*/
public static final class PusherStub extends io.grpc.stub.AbstractAsyncStub {
private PusherStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected PusherStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PusherStub(channel, callOptions);
}
/**
*/
public void push(logproto.Logproto.PushRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getPushMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class PusherBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private PusherBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected PusherBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PusherBlockingStub(channel, callOptions);
}
/**
*/
public logproto.Logproto.PushResponse push(logproto.Logproto.PushRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getPushMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class PusherFutureStub extends io.grpc.stub.AbstractFutureStub {
private PusherFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected PusherFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new PusherFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture push(
logproto.Logproto.PushRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getPushMethod(), getCallOptions()), request);
}
}
private static final int METHODID_PUSH = 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 PusherImplBase serviceImpl;
private final int methodId;
MethodHandlers(PusherImplBase 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_PUSH:
serviceImpl.push((logproto.Logproto.PushRequest) 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();
}
}
}
private static abstract class PusherBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
PusherBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return logproto.Logproto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Pusher");
}
}
private static final class PusherFileDescriptorSupplier
extends PusherBaseDescriptorSupplier {
PusherFileDescriptorSupplier() {}
}
private static final class PusherMethodDescriptorSupplier
extends PusherBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
PusherMethodDescriptorSupplier(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 (PusherGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new PusherFileDescriptorSupplier())
.addMethod(getPushMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy