org.glowroot.wire.api.model.DownstreamServiceGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glowroot-agent-it-harness Show documentation
Show all versions of glowroot-agent-it-harness Show documentation
Glowroot Agent Integration Test Harness
package org.glowroot.wire.api.model;
import static org.glowroot.agent.it.harness.shaded.io.grpc.MethodDescriptor.generateFullMethodName;
import static org.glowroot.agent.it.harness.shaded.io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static org.glowroot.agent.it.harness.shaded.io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static org.glowroot.agent.it.harness.shaded.io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static org.glowroot.agent.it.harness.shaded.io.grpc.stub.ClientCalls.asyncUnaryCall;
import static org.glowroot.agent.it.harness.shaded.io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static org.glowroot.agent.it.harness.shaded.io.grpc.stub.ClientCalls.blockingUnaryCall;
import static org.glowroot.agent.it.harness.shaded.io.grpc.stub.ClientCalls.futureUnaryCall;
import static org.glowroot.agent.it.harness.shaded.io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static org.glowroot.agent.it.harness.shaded.io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static org.glowroot.agent.it.harness.shaded.io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static org.glowroot.agent.it.harness.shaded.io.grpc.stub.ServerCalls.asyncUnaryCall;
import static org.glowroot.agent.it.harness.shaded.io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static org.glowroot.agent.it.harness.shaded.io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@org.glowroot.agent.it.harness.shaded.javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.14.0)",
comments = "Source: DownstreamService.proto")
public final class DownstreamServiceGrpc {
private DownstreamServiceGrpc() {}
public static final String SERVICE_NAME = "org_glowroot_wire_api_model.DownstreamService";
// Static method descriptors that strictly reflect the proto.
private static volatile org.glowroot.agent.it.harness.shaded.io.grpc.MethodDescriptor getConnectMethod;
@org.glowroot.agent.it.harness.shaded.io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "connect",
requestType = org.glowroot.wire.api.model.DownstreamServiceOuterClass.AgentResponse.class,
responseType = org.glowroot.wire.api.model.DownstreamServiceOuterClass.CentralRequest.class,
methodType = org.glowroot.agent.it.harness.shaded.io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static org.glowroot.agent.it.harness.shaded.io.grpc.MethodDescriptor getConnectMethod() {
org.glowroot.agent.it.harness.shaded.io.grpc.MethodDescriptor getConnectMethod;
if ((getConnectMethod = DownstreamServiceGrpc.getConnectMethod) == null) {
synchronized (DownstreamServiceGrpc.class) {
if ((getConnectMethod = DownstreamServiceGrpc.getConnectMethod) == null) {
DownstreamServiceGrpc.getConnectMethod = getConnectMethod =
org.glowroot.agent.it.harness.shaded.io.grpc.MethodDescriptor.newBuilder()
.setType(org.glowroot.agent.it.harness.shaded.io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"org_glowroot_wire_api_model.DownstreamService", "connect"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(org.glowroot.agent.it.harness.shaded.io.grpc.protobuf.ProtoUtils.marshaller(
org.glowroot.wire.api.model.DownstreamServiceOuterClass.AgentResponse.getDefaultInstance()))
.setResponseMarshaller(org.glowroot.agent.it.harness.shaded.io.grpc.protobuf.ProtoUtils.marshaller(
org.glowroot.wire.api.model.DownstreamServiceOuterClass.CentralRequest.getDefaultInstance()))
.setSchemaDescriptor(new DownstreamServiceMethodDescriptorSupplier("connect"))
.build();
}
}
}
return getConnectMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static DownstreamServiceStub newStub(org.glowroot.agent.it.harness.shaded.io.grpc.Channel channel) {
return new DownstreamServiceStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static DownstreamServiceBlockingStub newBlockingStub(
org.glowroot.agent.it.harness.shaded.io.grpc.Channel channel) {
return new DownstreamServiceBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static DownstreamServiceFutureStub newFutureStub(
org.glowroot.agent.it.harness.shaded.io.grpc.Channel channel) {
return new DownstreamServiceFutureStub(channel);
}
/**
*/
public static abstract class DownstreamServiceImplBase implements org.glowroot.agent.it.harness.shaded.io.grpc.BindableService {
/**
*/
public org.glowroot.agent.it.harness.shaded.io.grpc.stub.StreamObserver connect(
org.glowroot.agent.it.harness.shaded.io.grpc.stub.StreamObserver responseObserver) {
return asyncUnimplementedStreamingCall(getConnectMethod(), responseObserver);
}
@java.lang.Override public final org.glowroot.agent.it.harness.shaded.io.grpc.ServerServiceDefinition bindService() {
return org.glowroot.agent.it.harness.shaded.io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getConnectMethod(),
asyncBidiStreamingCall(
new MethodHandlers<
org.glowroot.wire.api.model.DownstreamServiceOuterClass.AgentResponse,
org.glowroot.wire.api.model.DownstreamServiceOuterClass.CentralRequest>(
this, METHODID_CONNECT)))
.build();
}
}
/**
*/
public static final class DownstreamServiceStub extends org.glowroot.agent.it.harness.shaded.io.grpc.stub.AbstractStub {
private DownstreamServiceStub(org.glowroot.agent.it.harness.shaded.io.grpc.Channel channel) {
super(channel);
}
private DownstreamServiceStub(org.glowroot.agent.it.harness.shaded.io.grpc.Channel channel,
org.glowroot.agent.it.harness.shaded.io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DownstreamServiceStub build(org.glowroot.agent.it.harness.shaded.io.grpc.Channel channel,
org.glowroot.agent.it.harness.shaded.io.grpc.CallOptions callOptions) {
return new DownstreamServiceStub(channel, callOptions);
}
/**
*/
public org.glowroot.agent.it.harness.shaded.io.grpc.stub.StreamObserver connect(
org.glowroot.agent.it.harness.shaded.io.grpc.stub.StreamObserver responseObserver) {
return asyncBidiStreamingCall(
getChannel().newCall(getConnectMethod(), getCallOptions()), responseObserver);
}
}
/**
*/
public static final class DownstreamServiceBlockingStub extends org.glowroot.agent.it.harness.shaded.io.grpc.stub.AbstractStub {
private DownstreamServiceBlockingStub(org.glowroot.agent.it.harness.shaded.io.grpc.Channel channel) {
super(channel);
}
private DownstreamServiceBlockingStub(org.glowroot.agent.it.harness.shaded.io.grpc.Channel channel,
org.glowroot.agent.it.harness.shaded.io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DownstreamServiceBlockingStub build(org.glowroot.agent.it.harness.shaded.io.grpc.Channel channel,
org.glowroot.agent.it.harness.shaded.io.grpc.CallOptions callOptions) {
return new DownstreamServiceBlockingStub(channel, callOptions);
}
}
/**
*/
public static final class DownstreamServiceFutureStub extends org.glowroot.agent.it.harness.shaded.io.grpc.stub.AbstractStub {
private DownstreamServiceFutureStub(org.glowroot.agent.it.harness.shaded.io.grpc.Channel channel) {
super(channel);
}
private DownstreamServiceFutureStub(org.glowroot.agent.it.harness.shaded.io.grpc.Channel channel,
org.glowroot.agent.it.harness.shaded.io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DownstreamServiceFutureStub build(org.glowroot.agent.it.harness.shaded.io.grpc.Channel channel,
org.glowroot.agent.it.harness.shaded.io.grpc.CallOptions callOptions) {
return new DownstreamServiceFutureStub(channel, callOptions);
}
}
private static final int METHODID_CONNECT = 0;
private static final class MethodHandlers implements
org.glowroot.agent.it.harness.shaded.io.grpc.stub.ServerCalls.UnaryMethod,
org.glowroot.agent.it.harness.shaded.io.grpc.stub.ServerCalls.ServerStreamingMethod,
org.glowroot.agent.it.harness.shaded.io.grpc.stub.ServerCalls.ClientStreamingMethod,
org.glowroot.agent.it.harness.shaded.io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final DownstreamServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(DownstreamServiceImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, org.glowroot.agent.it.harness.shaded.io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public org.glowroot.agent.it.harness.shaded.io.grpc.stub.StreamObserver invoke(
org.glowroot.agent.it.harness.shaded.io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_CONNECT:
return (org.glowroot.agent.it.harness.shaded.io.grpc.stub.StreamObserver) serviceImpl.connect(
(org.glowroot.agent.it.harness.shaded.io.grpc.stub.StreamObserver) responseObserver);
default:
throw new AssertionError();
}
}
}
private static abstract class DownstreamServiceBaseDescriptorSupplier
implements org.glowroot.agent.it.harness.shaded.io.grpc.protobuf.ProtoFileDescriptorSupplier, org.glowroot.agent.it.harness.shaded.io.grpc.protobuf.ProtoServiceDescriptorSupplier {
DownstreamServiceBaseDescriptorSupplier() {}
@java.lang.Override
public org.glowroot.agent.it.harness.shaded.com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return org.glowroot.wire.api.model.DownstreamServiceOuterClass.getDescriptor();
}
@java.lang.Override
public org.glowroot.agent.it.harness.shaded.com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("DownstreamService");
}
}
private static final class DownstreamServiceFileDescriptorSupplier
extends DownstreamServiceBaseDescriptorSupplier {
DownstreamServiceFileDescriptorSupplier() {}
}
private static final class DownstreamServiceMethodDescriptorSupplier
extends DownstreamServiceBaseDescriptorSupplier
implements org.glowroot.agent.it.harness.shaded.io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
DownstreamServiceMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public org.glowroot.agent.it.harness.shaded.com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile org.glowroot.agent.it.harness.shaded.io.grpc.ServiceDescriptor serviceDescriptor;
public static org.glowroot.agent.it.harness.shaded.io.grpc.ServiceDescriptor getServiceDescriptor() {
org.glowroot.agent.it.harness.shaded.io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (DownstreamServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = org.glowroot.agent.it.harness.shaded.io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new DownstreamServiceFileDescriptorSupplier())
.addMethod(getConnectMethod())
.build();
}
}
}
return result;
}
}