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

examples.GreeterGrpc Maven / Gradle / Ivy

package examples;

import static alluxio.shaded.client.io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * The greeting service definition.
 * 
*/ @alluxio.shaded.client.javax.annotation.Generated( value = "by gRPC proto alluxio.shaded.client.com.iler (version 1.50.2)", alluxio.shaded.client.com.ents = "Source: helloworld.proto") @alluxio.shaded.client.io.grpc.stub.annotations.GrpcGenerated public final class GreeterGrpc { private GreeterGrpc() {} public static final String SERVICE_NAME = "helloworld.Greeter"; // Static method descriptors that strictly reflect the proto. private static volatile alluxio.shaded.client.io.grpc.MethodDescriptor getSayHelloMethod; @alluxio.shaded.client.io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "SayHello", requestType = examples.HelloRequest.class, responseType = examples.HelloReply.class, methodType = alluxio.shaded.client.io.grpc.MethodDescriptor.MethodType.UNARY) public static alluxio.shaded.client.io.grpc.MethodDescriptor getSayHelloMethod() { alluxio.shaded.client.io.grpc.MethodDescriptor getSayHelloMethod; if ((getSayHelloMethod = GreeterGrpc.getSayHelloMethod) == null) { synchronized (GreeterGrpc.class) { if ((getSayHelloMethod = GreeterGrpc.getSayHelloMethod) == null) { GreeterGrpc.getSayHelloMethod = getSayHelloMethod = alluxio.shaded.client.io.grpc.MethodDescriptor.newBuilder() .setType(alluxio.shaded.client.io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SayHello")) .setSampledToLocalTracing(true) .setRequestMarshaller(alluxio.shaded.client.io.grpc.protobuf.ProtoUtils.marshaller( examples.HelloRequest.getDefaultInstance())) .setResponseMarshaller(alluxio.shaded.client.io.grpc.protobuf.ProtoUtils.marshaller( examples.HelloReply.getDefaultInstance())) .setSchemaDescriptor(new GreeterMethodDescriptorSupplier("SayHello")) .build(); } } } return getSayHelloMethod; } /** * Creates a new async stub that supports all call types for the service */ public static GreeterStub newStub(alluxio.shaded.client.io.grpc.Channel channel) { alluxio.shaded.client.io.grpc.stub.AbstractStub.StubFactory factory = new alluxio.shaded.client.io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public GreeterStub newStub(alluxio.shaded.client.io.grpc.Channel channel, alluxio.shaded.client.io.grpc.CallOptions callOptions) { return new GreeterStub(channel, callOptions); } }; return GreeterStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static GreeterBlockingStub newBlockingStub( alluxio.shaded.client.io.grpc.Channel channel) { alluxio.shaded.client.io.grpc.stub.AbstractStub.StubFactory factory = new alluxio.shaded.client.io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public GreeterBlockingStub newStub(alluxio.shaded.client.io.grpc.Channel channel, alluxio.shaded.client.io.grpc.CallOptions callOptions) { return new GreeterBlockingStub(channel, callOptions); } }; return GreeterBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static GreeterFutureStub newFutureStub( alluxio.shaded.client.io.grpc.Channel channel) { alluxio.shaded.client.io.grpc.stub.AbstractStub.StubFactory factory = new alluxio.shaded.client.io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public GreeterFutureStub newStub(alluxio.shaded.client.io.grpc.Channel channel, alluxio.shaded.client.io.grpc.CallOptions callOptions) { return new GreeterFutureStub(channel, callOptions); } }; return GreeterFutureStub.newStub(factory, channel); } /** *
   * The greeting service definition.
   * 
*/ public static abstract class GreeterImplBase implements alluxio.shaded.client.io.grpc.BindableService { /** *
     * Sends a greeting
     * 
*/ public void sayHello(examples.HelloRequest request, alluxio.shaded.client.io.grpc.stub.StreamObserver responseObserver) { alluxio.shaded.client.io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSayHelloMethod(), responseObserver); } @java.lang.Override public final alluxio.shaded.client.io.grpc.ServerServiceDefinition bindService() { return alluxio.shaded.client.io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getSayHelloMethod(), alluxio.shaded.client.io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< examples.HelloRequest, examples.HelloReply>( this, METHODID_SAY_HELLO))) .build(); } } /** *
   * The greeting service definition.
   * 
*/ public static final class GreeterStub extends alluxio.shaded.client.io.grpc.stub.AbstractAsyncStub { private GreeterStub( alluxio.shaded.client.io.grpc.Channel channel, alluxio.shaded.client.io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected GreeterStub build( alluxio.shaded.client.io.grpc.Channel channel, alluxio.shaded.client.io.grpc.CallOptions callOptions) { return new GreeterStub(channel, callOptions); } /** *
     * Sends a greeting
     * 
*/ public void sayHello(examples.HelloRequest request, alluxio.shaded.client.io.grpc.stub.StreamObserver responseObserver) { alluxio.shaded.client.io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getSayHelloMethod(), getCallOptions()), request, responseObserver); } } /** *
   * The greeting service definition.
   * 
*/ public static final class GreeterBlockingStub extends alluxio.shaded.client.io.grpc.stub.AbstractBlockingStub { private GreeterBlockingStub( alluxio.shaded.client.io.grpc.Channel channel, alluxio.shaded.client.io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected GreeterBlockingStub build( alluxio.shaded.client.io.grpc.Channel channel, alluxio.shaded.client.io.grpc.CallOptions callOptions) { return new GreeterBlockingStub(channel, callOptions); } /** *
     * Sends a greeting
     * 
*/ public examples.HelloReply sayHello(examples.HelloRequest request) { return alluxio.shaded.client.io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getSayHelloMethod(), getCallOptions(), request); } } /** *
   * The greeting service definition.
   * 
*/ public static final class GreeterFutureStub extends alluxio.shaded.client.io.grpc.stub.AbstractFutureStub { private GreeterFutureStub( alluxio.shaded.client.io.grpc.Channel channel, alluxio.shaded.client.io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected GreeterFutureStub build( alluxio.shaded.client.io.grpc.Channel channel, alluxio.shaded.client.io.grpc.CallOptions callOptions) { return new GreeterFutureStub(channel, callOptions); } /** *
     * Sends a greeting
     * 
*/ public alluxio.shaded.client.com.google.alluxio.shaded.client.com.on.util.concurrent.ListenableFuture sayHello( examples.HelloRequest request) { return alluxio.shaded.client.io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getSayHelloMethod(), getCallOptions()), request); } } private static final int METHODID_SAY_HELLO = 0; private static final class MethodHandlers implements alluxio.shaded.client.io.grpc.stub.ServerCalls.UnaryMethod, alluxio.shaded.client.io.grpc.stub.ServerCalls.ServerStreamingMethod, alluxio.shaded.client.io.grpc.stub.ServerCalls.ClientStreamingMethod, alluxio.shaded.client.io.grpc.stub.ServerCalls.BidiStreamingMethod { private final GreeterImplBase serviceImpl; private final int methodId; MethodHandlers(GreeterImplBase serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, alluxio.shaded.client.io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_SAY_HELLO: serviceImpl.sayHello((examples.HelloRequest) request, (alluxio.shaded.client.io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); } } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public alluxio.shaded.client.io.grpc.stub.StreamObserver invoke( alluxio.shaded.client.io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { default: throw new AssertionError(); } } } private static abstract class GreeterBaseDescriptorSupplier implements alluxio.shaded.client.io.grpc.protobuf.ProtoFileDescriptorSupplier, alluxio.shaded.client.io.grpc.protobuf.ProtoServiceDescriptorSupplier { GreeterBaseDescriptorSupplier() {} @java.lang.Override public alluxio.shaded.client.com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return examples.HelloWorldProto.getDescriptor(); } @java.lang.Override public alluxio.shaded.client.com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("Greeter"); } } private static final class GreeterFileDescriptorSupplier extends GreeterBaseDescriptorSupplier { GreeterFileDescriptorSupplier() {} } private static final class GreeterMethodDescriptorSupplier extends GreeterBaseDescriptorSupplier implements alluxio.shaded.client.io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; GreeterMethodDescriptorSupplier(String methodName) { this.methodName = methodName; } @java.lang.Override public alluxio.shaded.client.com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { return getServiceDescriptor().findMethodByName(methodName); } } private static volatile alluxio.shaded.client.io.grpc.ServiceDescriptor serviceDescriptor; public static alluxio.shaded.client.io.grpc.ServiceDescriptor getServiceDescriptor() { alluxio.shaded.client.io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { synchronized (GreeterGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = alluxio.shaded.client.io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new GreeterFileDescriptorSupplier()) .addMethod(getSayHelloMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy