Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package io.helidon.config.etcd.internal.client.proto;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.60.0)",
comments = "Source: rpc.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class WatchGrpc {
private WatchGrpc() {}
public static final java.lang.String SERVICE_NAME = "etcdserverpb.Watch";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getWatchMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Watch",
requestType = io.helidon.config.etcd.internal.client.proto.WatchRequest.class,
responseType = io.helidon.config.etcd.internal.client.proto.WatchResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getWatchMethod() {
io.grpc.MethodDescriptor getWatchMethod;
if ((getWatchMethod = WatchGrpc.getWatchMethod) == null) {
synchronized (WatchGrpc.class) {
if ((getWatchMethod = WatchGrpc.getWatchMethod) == null) {
WatchGrpc.getWatchMethod = getWatchMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Watch"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.helidon.config.etcd.internal.client.proto.WatchRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.helidon.config.etcd.internal.client.proto.WatchResponse.getDefaultInstance()))
.setSchemaDescriptor(new WatchMethodDescriptorSupplier("Watch"))
.build();
}
}
}
return getWatchMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static WatchStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public WatchStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new WatchStub(channel, callOptions);
}
};
return WatchStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static WatchBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public WatchBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new WatchBlockingStub(channel, callOptions);
}
};
return WatchBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static WatchFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public WatchFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new WatchFutureStub(channel, callOptions);
}
};
return WatchFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*
* Watch watches for events happening or that have happened. Both input and output
* are streams; the input stream is for creating and canceling watchers and the output
* stream sends events. One watch RPC can watch on multiple key ranges, streaming events
* for several watches at once. The entire event history can be watched starting from the
* last compaction revision.
*
*/
default io.grpc.stub.StreamObserver watch(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getWatchMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service Watch.
*/
public static abstract class WatchImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return WatchGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service Watch.
*/
public static final class WatchStub
extends io.grpc.stub.AbstractAsyncStub {
private WatchStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected WatchStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new WatchStub(channel, callOptions);
}
/**
*
* Watch watches for events happening or that have happened. Both input and output
* are streams; the input stream is for creating and canceling watchers and the output
* stream sends events. One watch RPC can watch on multiple key ranges, streaming events
* for several watches at once. The entire event history can be watched starting from the
* last compaction revision.
*
*/
public io.grpc.stub.StreamObserver watch(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
getChannel().newCall(getWatchMethod(), getCallOptions()), responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service Watch.
*/
public static final class WatchBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private WatchBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected WatchBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new WatchBlockingStub(channel, callOptions);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service Watch.
*/
public static final class WatchFutureStub
extends io.grpc.stub.AbstractFutureStub {
private WatchFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected WatchFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new WatchFutureStub(channel, callOptions);
}
}
private static final int METHODID_WATCH = 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 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) {
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_WATCH:
return (io.grpc.stub.StreamObserver) serviceImpl.watch(
(io.grpc.stub.StreamObserver) responseObserver);
default:
throw new AssertionError();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getWatchMethod(),
io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
new MethodHandlers<
io.helidon.config.etcd.internal.client.proto.WatchRequest,
io.helidon.config.etcd.internal.client.proto.WatchResponse>(
service, METHODID_WATCH)))
.build();
}
private static abstract class WatchBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
WatchBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return io.helidon.config.etcd.internal.client.proto.EtcdProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Watch");
}
}
private static final class WatchFileDescriptorSupplier
extends WatchBaseDescriptorSupplier {
WatchFileDescriptorSupplier() {}
}
private static final class WatchMethodDescriptorSupplier
extends WatchBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
WatchMethodDescriptorSupplier(java.lang.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 (WatchGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new WatchFileDescriptorSupplier())
.addMethod(getWatchMethod())
.build();
}
}
}
return result;
}
}