All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.glowroot.wire.api.model.CollectorServiceGrpc Maven / Gradle / Ivy

There is a newer version: 0.9.24
Show newest version
package org.glowroot.wire.api.model;

import static org.glowroot.agent.shaded.grpc.stub.ClientCalls.asyncUnaryCall;
import static org.glowroot.agent.shaded.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static org.glowroot.agent.shaded.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static org.glowroot.agent.shaded.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static org.glowroot.agent.shaded.grpc.stub.ClientCalls.blockingUnaryCall;
import static org.glowroot.agent.shaded.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static org.glowroot.agent.shaded.grpc.stub.ClientCalls.futureUnaryCall;
import static org.glowroot.agent.shaded.grpc.MethodDescriptor.generateFullMethodName;
import static org.glowroot.agent.shaded.grpc.stub.ServerCalls.asyncUnaryCall;
import static org.glowroot.agent.shaded.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static org.glowroot.agent.shaded.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static org.glowroot.agent.shaded.grpc.stub.ServerCalls.asyncBidiStreamingCall;

@javax.annotation.Generated("by gRPC proto compiler")
public class CollectorServiceGrpc {

  private CollectorServiceGrpc() {}

  public static final String SERVICE_NAME = "org_glowroot_wire_api_model.CollectorService";

  // Static method descriptors that strictly reflect the proto.
  @org.glowroot.agent.shaded.grpc.ExperimentalApi
  public static final org.glowroot.agent.shaded.grpc.MethodDescriptor METHOD_COLLECT_INIT =
      org.glowroot.agent.shaded.grpc.MethodDescriptor.create(
          org.glowroot.agent.shaded.grpc.MethodDescriptor.MethodType.UNARY,
          generateFullMethodName(
              "org_glowroot_wire_api_model.CollectorService", "collectInit"),
          org.glowroot.agent.shaded.grpc.protobuf.ProtoUtils.marshaller(org.glowroot.wire.api.model.CollectorServiceOuterClass.InitMessage.getDefaultInstance()),
          org.glowroot.agent.shaded.grpc.protobuf.ProtoUtils.marshaller(org.glowroot.wire.api.model.CollectorServiceOuterClass.InitResponse.getDefaultInstance()));
  @org.glowroot.agent.shaded.grpc.ExperimentalApi
  public static final org.glowroot.agent.shaded.grpc.MethodDescriptor METHOD_COLLECT_AGGREGATES =
      org.glowroot.agent.shaded.grpc.MethodDescriptor.create(
          org.glowroot.agent.shaded.grpc.MethodDescriptor.MethodType.UNARY,
          generateFullMethodName(
              "org_glowroot_wire_api_model.CollectorService", "collectAggregates"),
          org.glowroot.agent.shaded.grpc.protobuf.ProtoUtils.marshaller(org.glowroot.wire.api.model.CollectorServiceOuterClass.AggregateMessage.getDefaultInstance()),
          org.glowroot.agent.shaded.grpc.protobuf.ProtoUtils.marshaller(org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage.getDefaultInstance()));
  @org.glowroot.agent.shaded.grpc.ExperimentalApi
  public static final org.glowroot.agent.shaded.grpc.MethodDescriptor METHOD_COLLECT_GAUGE_VALUES =
      org.glowroot.agent.shaded.grpc.MethodDescriptor.create(
          org.glowroot.agent.shaded.grpc.MethodDescriptor.MethodType.UNARY,
          generateFullMethodName(
              "org_glowroot_wire_api_model.CollectorService", "collectGaugeValues"),
          org.glowroot.agent.shaded.grpc.protobuf.ProtoUtils.marshaller(org.glowroot.wire.api.model.CollectorServiceOuterClass.GaugeValueMessage.getDefaultInstance()),
          org.glowroot.agent.shaded.grpc.protobuf.ProtoUtils.marshaller(org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage.getDefaultInstance()));
  @org.glowroot.agent.shaded.grpc.ExperimentalApi
  public static final org.glowroot.agent.shaded.grpc.MethodDescriptor METHOD_COLLECT_TRACE =
      org.glowroot.agent.shaded.grpc.MethodDescriptor.create(
          org.glowroot.agent.shaded.grpc.MethodDescriptor.MethodType.UNARY,
          generateFullMethodName(
              "org_glowroot_wire_api_model.CollectorService", "collectTrace"),
          org.glowroot.agent.shaded.grpc.protobuf.ProtoUtils.marshaller(org.glowroot.wire.api.model.CollectorServiceOuterClass.TraceMessage.getDefaultInstance()),
          org.glowroot.agent.shaded.grpc.protobuf.ProtoUtils.marshaller(org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage.getDefaultInstance()));
  @org.glowroot.agent.shaded.grpc.ExperimentalApi
  public static final org.glowroot.agent.shaded.grpc.MethodDescriptor METHOD_LOG =
      org.glowroot.agent.shaded.grpc.MethodDescriptor.create(
          org.glowroot.agent.shaded.grpc.MethodDescriptor.MethodType.UNARY,
          generateFullMethodName(
              "org_glowroot_wire_api_model.CollectorService", "log"),
          org.glowroot.agent.shaded.grpc.protobuf.ProtoUtils.marshaller(org.glowroot.wire.api.model.CollectorServiceOuterClass.LogMessage.getDefaultInstance()),
          org.glowroot.agent.shaded.grpc.protobuf.ProtoUtils.marshaller(org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage.getDefaultInstance()));

  public static CollectorServiceStub newStub(org.glowroot.agent.shaded.grpc.Channel channel) {
    return new CollectorServiceStub(channel);
  }

  public static CollectorServiceBlockingStub newBlockingStub(
      org.glowroot.agent.shaded.grpc.Channel channel) {
    return new CollectorServiceBlockingStub(channel);
  }

  public static CollectorServiceFutureStub newFutureStub(
      org.glowroot.agent.shaded.grpc.Channel channel) {
    return new CollectorServiceFutureStub(channel);
  }

  public static interface CollectorService {

    public void collectInit(org.glowroot.wire.api.model.CollectorServiceOuterClass.InitMessage request,
        org.glowroot.agent.shaded.grpc.stub.StreamObserver responseObserver);

    public void collectAggregates(org.glowroot.wire.api.model.CollectorServiceOuterClass.AggregateMessage request,
        org.glowroot.agent.shaded.grpc.stub.StreamObserver responseObserver);

    public void collectGaugeValues(org.glowroot.wire.api.model.CollectorServiceOuterClass.GaugeValueMessage request,
        org.glowroot.agent.shaded.grpc.stub.StreamObserver responseObserver);

    public void collectTrace(org.glowroot.wire.api.model.CollectorServiceOuterClass.TraceMessage request,
        org.glowroot.agent.shaded.grpc.stub.StreamObserver responseObserver);

    public void log(org.glowroot.wire.api.model.CollectorServiceOuterClass.LogMessage request,
        org.glowroot.agent.shaded.grpc.stub.StreamObserver responseObserver);
  }

  public static interface CollectorServiceBlockingClient {

    public org.glowroot.wire.api.model.CollectorServiceOuterClass.InitResponse collectInit(org.glowroot.wire.api.model.CollectorServiceOuterClass.InitMessage request);

    public org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage collectAggregates(org.glowroot.wire.api.model.CollectorServiceOuterClass.AggregateMessage request);

    public org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage collectGaugeValues(org.glowroot.wire.api.model.CollectorServiceOuterClass.GaugeValueMessage request);

    public org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage collectTrace(org.glowroot.wire.api.model.CollectorServiceOuterClass.TraceMessage request);

    public org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage log(org.glowroot.wire.api.model.CollectorServiceOuterClass.LogMessage request);
  }

  public static interface CollectorServiceFutureClient {

    public com.google.common.util.concurrent.ListenableFuture collectInit(
        org.glowroot.wire.api.model.CollectorServiceOuterClass.InitMessage request);

    public com.google.common.util.concurrent.ListenableFuture collectAggregates(
        org.glowroot.wire.api.model.CollectorServiceOuterClass.AggregateMessage request);

    public com.google.common.util.concurrent.ListenableFuture collectGaugeValues(
        org.glowroot.wire.api.model.CollectorServiceOuterClass.GaugeValueMessage request);

    public com.google.common.util.concurrent.ListenableFuture collectTrace(
        org.glowroot.wire.api.model.CollectorServiceOuterClass.TraceMessage request);

    public com.google.common.util.concurrent.ListenableFuture log(
        org.glowroot.wire.api.model.CollectorServiceOuterClass.LogMessage request);
  }

  public static class CollectorServiceStub extends org.glowroot.agent.shaded.grpc.stub.AbstractStub
      implements CollectorService {
    private CollectorServiceStub(org.glowroot.agent.shaded.grpc.Channel channel) {
      super(channel);
    }

    private CollectorServiceStub(org.glowroot.agent.shaded.grpc.Channel channel,
        org.glowroot.agent.shaded.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected CollectorServiceStub build(org.glowroot.agent.shaded.grpc.Channel channel,
        org.glowroot.agent.shaded.grpc.CallOptions callOptions) {
      return new CollectorServiceStub(channel, callOptions);
    }

    @java.lang.Override
    public void collectInit(org.glowroot.wire.api.model.CollectorServiceOuterClass.InitMessage request,
        org.glowroot.agent.shaded.grpc.stub.StreamObserver responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_COLLECT_INIT, getCallOptions()), request, responseObserver);
    }

    @java.lang.Override
    public void collectAggregates(org.glowroot.wire.api.model.CollectorServiceOuterClass.AggregateMessage request,
        org.glowroot.agent.shaded.grpc.stub.StreamObserver responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_COLLECT_AGGREGATES, getCallOptions()), request, responseObserver);
    }

    @java.lang.Override
    public void collectGaugeValues(org.glowroot.wire.api.model.CollectorServiceOuterClass.GaugeValueMessage request,
        org.glowroot.agent.shaded.grpc.stub.StreamObserver responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_COLLECT_GAUGE_VALUES, getCallOptions()), request, responseObserver);
    }

    @java.lang.Override
    public void collectTrace(org.glowroot.wire.api.model.CollectorServiceOuterClass.TraceMessage request,
        org.glowroot.agent.shaded.grpc.stub.StreamObserver responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_COLLECT_TRACE, getCallOptions()), request, responseObserver);
    }

    @java.lang.Override
    public void log(org.glowroot.wire.api.model.CollectorServiceOuterClass.LogMessage request,
        org.glowroot.agent.shaded.grpc.stub.StreamObserver responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_LOG, getCallOptions()), request, responseObserver);
    }
  }

  public static class CollectorServiceBlockingStub extends org.glowroot.agent.shaded.grpc.stub.AbstractStub
      implements CollectorServiceBlockingClient {
    private CollectorServiceBlockingStub(org.glowroot.agent.shaded.grpc.Channel channel) {
      super(channel);
    }

    private CollectorServiceBlockingStub(org.glowroot.agent.shaded.grpc.Channel channel,
        org.glowroot.agent.shaded.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected CollectorServiceBlockingStub build(org.glowroot.agent.shaded.grpc.Channel channel,
        org.glowroot.agent.shaded.grpc.CallOptions callOptions) {
      return new CollectorServiceBlockingStub(channel, callOptions);
    }

    @java.lang.Override
    public org.glowroot.wire.api.model.CollectorServiceOuterClass.InitResponse collectInit(org.glowroot.wire.api.model.CollectorServiceOuterClass.InitMessage request) {
      return blockingUnaryCall(
          getChannel(), METHOD_COLLECT_INIT, getCallOptions(), request);
    }

    @java.lang.Override
    public org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage collectAggregates(org.glowroot.wire.api.model.CollectorServiceOuterClass.AggregateMessage request) {
      return blockingUnaryCall(
          getChannel(), METHOD_COLLECT_AGGREGATES, getCallOptions(), request);
    }

    @java.lang.Override
    public org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage collectGaugeValues(org.glowroot.wire.api.model.CollectorServiceOuterClass.GaugeValueMessage request) {
      return blockingUnaryCall(
          getChannel(), METHOD_COLLECT_GAUGE_VALUES, getCallOptions(), request);
    }

    @java.lang.Override
    public org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage collectTrace(org.glowroot.wire.api.model.CollectorServiceOuterClass.TraceMessage request) {
      return blockingUnaryCall(
          getChannel(), METHOD_COLLECT_TRACE, getCallOptions(), request);
    }

    @java.lang.Override
    public org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage log(org.glowroot.wire.api.model.CollectorServiceOuterClass.LogMessage request) {
      return blockingUnaryCall(
          getChannel(), METHOD_LOG, getCallOptions(), request);
    }
  }

  public static class CollectorServiceFutureStub extends org.glowroot.agent.shaded.grpc.stub.AbstractStub
      implements CollectorServiceFutureClient {
    private CollectorServiceFutureStub(org.glowroot.agent.shaded.grpc.Channel channel) {
      super(channel);
    }

    private CollectorServiceFutureStub(org.glowroot.agent.shaded.grpc.Channel channel,
        org.glowroot.agent.shaded.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected CollectorServiceFutureStub build(org.glowroot.agent.shaded.grpc.Channel channel,
        org.glowroot.agent.shaded.grpc.CallOptions callOptions) {
      return new CollectorServiceFutureStub(channel, callOptions);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture collectInit(
        org.glowroot.wire.api.model.CollectorServiceOuterClass.InitMessage request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_COLLECT_INIT, getCallOptions()), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture collectAggregates(
        org.glowroot.wire.api.model.CollectorServiceOuterClass.AggregateMessage request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_COLLECT_AGGREGATES, getCallOptions()), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture collectGaugeValues(
        org.glowroot.wire.api.model.CollectorServiceOuterClass.GaugeValueMessage request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_COLLECT_GAUGE_VALUES, getCallOptions()), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture collectTrace(
        org.glowroot.wire.api.model.CollectorServiceOuterClass.TraceMessage request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_COLLECT_TRACE, getCallOptions()), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture log(
        org.glowroot.wire.api.model.CollectorServiceOuterClass.LogMessage request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_LOG, getCallOptions()), request);
    }
  }

  private static final int METHODID_COLLECT_INIT = 0;
  private static final int METHODID_COLLECT_AGGREGATES = 1;
  private static final int METHODID_COLLECT_GAUGE_VALUES = 2;
  private static final int METHODID_COLLECT_TRACE = 3;
  private static final int METHODID_LOG = 4;

  private static class MethodHandlers implements
      org.glowroot.agent.shaded.grpc.stub.ServerCalls.UnaryMethod,
      org.glowroot.agent.shaded.grpc.stub.ServerCalls.ServerStreamingMethod,
      org.glowroot.agent.shaded.grpc.stub.ServerCalls.ClientStreamingMethod,
      org.glowroot.agent.shaded.grpc.stub.ServerCalls.BidiStreamingMethod {
    private final CollectorService serviceImpl;
    private final int methodId;

    public MethodHandlers(CollectorService serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, org.glowroot.agent.shaded.grpc.stub.StreamObserver responseObserver) {
      switch (methodId) {
        case METHODID_COLLECT_INIT:
          serviceImpl.collectInit((org.glowroot.wire.api.model.CollectorServiceOuterClass.InitMessage) request,
              (org.glowroot.agent.shaded.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_COLLECT_AGGREGATES:
          serviceImpl.collectAggregates((org.glowroot.wire.api.model.CollectorServiceOuterClass.AggregateMessage) request,
              (org.glowroot.agent.shaded.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_COLLECT_GAUGE_VALUES:
          serviceImpl.collectGaugeValues((org.glowroot.wire.api.model.CollectorServiceOuterClass.GaugeValueMessage) request,
              (org.glowroot.agent.shaded.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_COLLECT_TRACE:
          serviceImpl.collectTrace((org.glowroot.wire.api.model.CollectorServiceOuterClass.TraceMessage) request,
              (org.glowroot.agent.shaded.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_LOG:
          serviceImpl.log((org.glowroot.wire.api.model.CollectorServiceOuterClass.LogMessage) request,
              (org.glowroot.agent.shaded.grpc.stub.StreamObserver) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.SuppressWarnings("unchecked")
    public org.glowroot.agent.shaded.grpc.stub.StreamObserver invoke(
        org.glowroot.agent.shaded.grpc.stub.StreamObserver responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  public static org.glowroot.agent.shaded.grpc.ServerServiceDefinition bindService(
      final CollectorService serviceImpl) {
    return org.glowroot.agent.shaded.grpc.ServerServiceDefinition.builder(SERVICE_NAME)
        .addMethod(
          METHOD_COLLECT_INIT,
          asyncUnaryCall(
            new MethodHandlers<
              org.glowroot.wire.api.model.CollectorServiceOuterClass.InitMessage,
              org.glowroot.wire.api.model.CollectorServiceOuterClass.InitResponse>(
                serviceImpl, METHODID_COLLECT_INIT)))
        .addMethod(
          METHOD_COLLECT_AGGREGATES,
          asyncUnaryCall(
            new MethodHandlers<
              org.glowroot.wire.api.model.CollectorServiceOuterClass.AggregateMessage,
              org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage>(
                serviceImpl, METHODID_COLLECT_AGGREGATES)))
        .addMethod(
          METHOD_COLLECT_GAUGE_VALUES,
          asyncUnaryCall(
            new MethodHandlers<
              org.glowroot.wire.api.model.CollectorServiceOuterClass.GaugeValueMessage,
              org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage>(
                serviceImpl, METHODID_COLLECT_GAUGE_VALUES)))
        .addMethod(
          METHOD_COLLECT_TRACE,
          asyncUnaryCall(
            new MethodHandlers<
              org.glowroot.wire.api.model.CollectorServiceOuterClass.TraceMessage,
              org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage>(
                serviceImpl, METHODID_COLLECT_TRACE)))
        .addMethod(
          METHOD_LOG,
          asyncUnaryCall(
            new MethodHandlers<
              org.glowroot.wire.api.model.CollectorServiceOuterClass.LogMessage,
              org.glowroot.wire.api.model.CollectorServiceOuterClass.EmptyMessage>(
                serviceImpl, METHODID_LOG)))
        .build();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy