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

org.pipservices4.grpc.commandable.CommandableGrpc Maven / Gradle / Ivy

package org.pipservices4.grpc.commandable;

import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;

/**
 * 
 * The commandable service definition.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.4.0)", comments = "Source: commandable.proto") public final class CommandableGrpc { private CommandableGrpc() {} public static final String SERVICE_NAME = "commandable.Commandable"; // Static method descriptors that strictly reflect the proto. @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static final io.grpc.MethodDescriptor METHOD_INVOKE = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( "commandable.Commandable", "invoke")) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.pipservices4.grpc.commandable.InvokeRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.pipservices4.grpc.commandable.InvokeReply.getDefaultInstance())) .build(); /** * Creates a new async stub that supports all call types for the service */ public static CommandableStub newStub(io.grpc.Channel channel) { return new CommandableStub(channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static CommandableBlockingStub newBlockingStub( io.grpc.Channel channel) { return new CommandableBlockingStub(channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static CommandableFutureStub newFutureStub( io.grpc.Channel channel) { return new CommandableFutureStub(channel); } /** *
   * The commandable service definition.
   * 
*/ public static abstract class CommandableImplBase implements io.grpc.BindableService { /** */ public void invoke(org.pipservices4.grpc.commandable.InvokeRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(METHOD_INVOKE, responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( METHOD_INVOKE, asyncUnaryCall( new MethodHandlers< org.pipservices4.grpc.commandable.InvokeRequest, org.pipservices4.grpc.commandable.InvokeReply>( this, METHODID_INVOKE))) .build(); } } /** *
   * The commandable service definition.
   * 
*/ public static final class CommandableStub extends io.grpc.stub.AbstractStub { private CommandableStub(io.grpc.Channel channel) { super(channel); } private CommandableStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected CommandableStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new CommandableStub(channel, callOptions); } /** */ public void invoke(org.pipservices4.grpc.commandable.InvokeRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_INVOKE, getCallOptions()), request, responseObserver); } } /** *
   * The commandable service definition.
   * 
*/ public static final class CommandableBlockingStub extends io.grpc.stub.AbstractStub { private CommandableBlockingStub(io.grpc.Channel channel) { super(channel); } private CommandableBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected CommandableBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new CommandableBlockingStub(channel, callOptions); } /** */ public org.pipservices4.grpc.commandable.InvokeReply invoke(org.pipservices4.grpc.commandable.InvokeRequest request) { return blockingUnaryCall( getChannel(), METHOD_INVOKE, getCallOptions(), request); } } /** *
   * The commandable service definition.
   * 
*/ public static final class CommandableFutureStub extends io.grpc.stub.AbstractStub { private CommandableFutureStub(io.grpc.Channel channel) { super(channel); } private CommandableFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected CommandableFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new CommandableFutureStub(channel, callOptions); } /** */ public com.google.common.util.concurrent.ListenableFuture invoke( org.pipservices4.grpc.commandable.InvokeRequest request) { return futureUnaryCall( getChannel().newCall(METHOD_INVOKE, getCallOptions()), request); } } private static final int METHODID_INVOKE = 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 CommandableImplBase serviceImpl; private final int methodId; MethodHandlers(CommandableImplBase 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_INVOKE: serviceImpl.invoke((org.pipservices4.grpc.commandable.InvokeRequest) 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 final class CommandableDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier { @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return org.pipservices4.grpc.commandable.CommandableProto.getDescriptor(); } } private static volatile io.grpc.ServiceDescriptor serviceDescriptor; public static io.grpc.ServiceDescriptor getServiceDescriptor() { io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { synchronized (CommandableGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new CommandableDescriptorSupplier()) .addMethod(METHOD_INVOKE) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy