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

io.opentelemetry.proto.collector.metrics.v1.MetricsServiceGrpc Maven / Gradle / Ivy

There is a newer version: 1.0.46
Show newest version
package io.opentelemetry.proto.collector.metrics.v1;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * Service that can be used to push metrics between one Application
 * instrumented with OpenTelemetry and a collector, or between a collector and a
 * central collector.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.48.1)", comments = "Source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto") @io.grpc.stub.annotations.GrpcGenerated public final class MetricsServiceGrpc { private MetricsServiceGrpc() {} public static final String SERVICE_NAME = "opentelemetry.proto.collector.metrics.v1.MetricsService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getExportMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Export", requestType = io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.class, responseType = io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getExportMethod() { io.grpc.MethodDescriptor getExportMethod; if ((getExportMethod = MetricsServiceGrpc.getExportMethod) == null) { synchronized (MetricsServiceGrpc.class) { if ((getExportMethod = MetricsServiceGrpc.getExportMethod) == null) { MetricsServiceGrpc.getExportMethod = getExportMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Export")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.getDefaultInstance())) .setSchemaDescriptor(new MetricsServiceMethodDescriptorSupplier("Export")) .build(); } } } return getExportMethod; } /** * Creates a new async stub that supports all call types for the service */ public static MetricsServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public MetricsServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new MetricsServiceStub(channel, callOptions); } }; return MetricsServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static MetricsServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public MetricsServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new MetricsServiceBlockingStub(channel, callOptions); } }; return MetricsServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static MetricsServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public MetricsServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new MetricsServiceFutureStub(channel, callOptions); } }; return MetricsServiceFutureStub.newStub(factory, channel); } /** *
   * Service that can be used to push metrics between one Application
   * instrumented with OpenTelemetry and a collector, or between a collector and a
   * central collector.
   * 
*/ public static abstract class MetricsServiceImplBase implements io.grpc.BindableService { /** *
     * For performance reasons, it is recommended to keep this RPC
     * alive for the entire life of the application.
     * 
*/ public void export(io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExportMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getExportMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest, io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse>( this, METHODID_EXPORT))) .build(); } } /** *
   * Service that can be used to push metrics between one Application
   * instrumented with OpenTelemetry and a collector, or between a collector and a
   * central collector.
   * 
*/ public static final class MetricsServiceStub extends io.grpc.stub.AbstractAsyncStub { private MetricsServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected MetricsServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new MetricsServiceStub(channel, callOptions); } /** *
     * For performance reasons, it is recommended to keep this RPC
     * alive for the entire life of the application.
     * 
*/ public void export(io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getExportMethod(), getCallOptions()), request, responseObserver); } } /** *
   * Service that can be used to push metrics between one Application
   * instrumented with OpenTelemetry and a collector, or between a collector and a
   * central collector.
   * 
*/ public static final class MetricsServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private MetricsServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected MetricsServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new MetricsServiceBlockingStub(channel, callOptions); } /** *
     * For performance reasons, it is recommended to keep this RPC
     * alive for the entire life of the application.
     * 
*/ public io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse export(io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getExportMethod(), getCallOptions(), request); } } /** *
   * Service that can be used to push metrics between one Application
   * instrumented with OpenTelemetry and a collector, or between a collector and a
   * central collector.
   * 
*/ public static final class MetricsServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private MetricsServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected MetricsServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new MetricsServiceFutureStub(channel, callOptions); } /** *
     * For performance reasons, it is recommended to keep this RPC
     * alive for the entire life of the application.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture export( io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getExportMethod(), getCallOptions()), request); } } private static final int METHODID_EXPORT = 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 MetricsServiceImplBase serviceImpl; private final int methodId; MethodHandlers(MetricsServiceImplBase 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_EXPORT: serviceImpl.export((io.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest) 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 MetricsServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { MetricsServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return io.opentelemetry.proto.collector.metrics.v1.MetricsServiceProto.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("MetricsService"); } } private static final class MetricsServiceFileDescriptorSupplier extends MetricsServiceBaseDescriptorSupplier { MetricsServiceFileDescriptorSupplier() {} } private static final class MetricsServiceMethodDescriptorSupplier extends MetricsServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; MetricsServiceMethodDescriptorSupplier(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 (MetricsServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new MetricsServiceFileDescriptorSupplier()) .addMethod(getExportMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy