All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
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.
io.arthas.api.WatchGrpc Maven / Gradle / Ivy
package io.arthas.api;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.28.0)",
comments = "Source: ArthasServices.proto")
public final class WatchGrpc {
private WatchGrpc() {}
public static final String SERVICE_NAME = "io.arthas.api.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.arthas.api.ArthasServices.WatchRequest.class,
responseType = io.arthas.api.ArthasServices.ResponseBody.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_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.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "watch"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.arthas.api.ArthasServices.WatchRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.arthas.api.ArthasServices.ResponseBody.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 static abstract class WatchImplBase implements io.grpc.BindableService {
/**
*/
public void watch(io.arthas.api.ArthasServices.WatchRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getWatchMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getWatchMethod(),
asyncServerStreamingCall(
new MethodHandlers<
io.arthas.api.ArthasServices.WatchRequest,
io.arthas.api.ArthasServices.ResponseBody>(
this, METHODID_WATCH)))
.build();
}
}
/**
*/
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);
}
/**
*/
public void watch(io.arthas.api.ArthasServices.WatchRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncServerStreamingCall(
getChannel().newCall(getWatchMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
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);
}
/**
*/
public java.util.Iterator watch(
io.arthas.api.ArthasServices.WatchRequest request) {
return blockingServerStreamingCall(
getChannel(), getWatchMethod(), getCallOptions(), request);
}
}
/**
*/
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 WatchImplBase serviceImpl;
private final int methodId;
MethodHandlers(WatchImplBase 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_WATCH:
serviceImpl.watch((io.arthas.api.ArthasServices.WatchRequest) 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 WatchBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
WatchBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return io.arthas.api.ArthasServices.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 String methodName;
WatchMethodDescriptorSupplier(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;
}
}