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

com.tencent.polaris.client.pb.LocationGRPCGrpc Maven / Gradle / Ivy

There is a newer version: 1.15.5
Show newest version
package com.tencent.polaris.client.pb;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.38.0)",
    comments = "Source: grpcapi_location.proto")
public final class LocationGRPCGrpc {

  private LocationGRPCGrpc() {}

  public static final String SERVICE_NAME = "v1.LocationGRPC";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor getGetLocationMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetLocation",
      requestType = com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest.class,
      responseType = com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetLocationMethod() {
    io.grpc.MethodDescriptor getGetLocationMethod;
    if ((getGetLocationMethod = LocationGRPCGrpc.getGetLocationMethod) == null) {
      synchronized (LocationGRPCGrpc.class) {
        if ((getGetLocationMethod = LocationGRPCGrpc.getGetLocationMethod) == null) {
          LocationGRPCGrpc.getGetLocationMethod = getGetLocationMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLocation"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse.getDefaultInstance()))
              .setSchemaDescriptor(new LocationGRPCMethodDescriptorSupplier("GetLocation"))
              .build();
        }
      }
    }
    return getGetLocationMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static LocationGRPCStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public LocationGRPCStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new LocationGRPCStub(channel, callOptions);
        }
      };
    return LocationGRPCStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static LocationGRPCBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public LocationGRPCBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new LocationGRPCBlockingStub(channel, callOptions);
        }
      };
    return LocationGRPCBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static LocationGRPCFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public LocationGRPCFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new LocationGRPCFutureStub(channel, callOptions);
        }
      };
    return LocationGRPCFutureStub.newStub(factory, channel);
  }

  /**
   */
  public static abstract class LocationGRPCImplBase implements io.grpc.BindableService {

    /**
     * 
     * 获取客户端地理位置信息
     * 
*/ public void getLocation(com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLocationMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getGetLocationMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest, com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse>( this, METHODID_GET_LOCATION))) .build(); } } /** */ public static final class LocationGRPCStub extends io.grpc.stub.AbstractAsyncStub { private LocationGRPCStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected LocationGRPCStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new LocationGRPCStub(channel, callOptions); } /** *
     * 获取客户端地理位置信息
     * 
*/ public void getLocation(com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetLocationMethod(), getCallOptions()), request, responseObserver); } } /** */ public static final class LocationGRPCBlockingStub extends io.grpc.stub.AbstractBlockingStub { private LocationGRPCBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected LocationGRPCBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new LocationGRPCBlockingStub(channel, callOptions); } /** *
     * 获取客户端地理位置信息
     * 
*/ public com.tencent.polaris.client.pb.LocationGRPCService.LocationResponse getLocation(com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetLocationMethod(), getCallOptions(), request); } } /** */ public static final class LocationGRPCFutureStub extends io.grpc.stub.AbstractFutureStub { private LocationGRPCFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected LocationGRPCFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new LocationGRPCFutureStub(channel, callOptions); } /** *
     * 获取客户端地理位置信息
     * 
*/ public com.google.common.util.concurrent.ListenableFuture getLocation( com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetLocationMethod(), getCallOptions()), request); } } private static final int METHODID_GET_LOCATION = 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 LocationGRPCImplBase serviceImpl; private final int methodId; MethodHandlers(LocationGRPCImplBase 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_GET_LOCATION: serviceImpl.getLocation((com.tencent.polaris.client.pb.LocationGRPCService.LocationRequest) 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 LocationGRPCBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { LocationGRPCBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return com.tencent.polaris.client.pb.LocationGRPCService.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("LocationGRPC"); } } private static final class LocationGRPCFileDescriptorSupplier extends LocationGRPCBaseDescriptorSupplier { LocationGRPCFileDescriptorSupplier() {} } private static final class LocationGRPCMethodDescriptorSupplier extends LocationGRPCBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; LocationGRPCMethodDescriptorSupplier(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 (LocationGRPCGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new LocationGRPCFileDescriptorSupplier()) .addMethod(getGetLocationMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy