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

main.grpc.pbx.NodeGrpc Maven / Gradle / Ivy

There is a newer version: 5.133.1
Show newest version
package pbx;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * This is the single method that needs to be implemented by a gRPC client.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.65.1)", comments = "Source: pbx/model.proto") @io.grpc.stub.annotations.GrpcGenerated public final class NodeGrpc { private NodeGrpc() {} public static final java.lang.String SERVICE_NAME = "pbx.Node"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getMessageLoopMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "MessageLoop", requestType = pbx.Model.ClientMsg.class, responseType = pbx.Model.ServerMsg.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) public static io.grpc.MethodDescriptor getMessageLoopMethod() { io.grpc.MethodDescriptor getMessageLoopMethod; if ((getMessageLoopMethod = NodeGrpc.getMessageLoopMethod) == null) { synchronized (NodeGrpc.class) { if ((getMessageLoopMethod = NodeGrpc.getMessageLoopMethod) == null) { NodeGrpc.getMessageLoopMethod = getMessageLoopMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "MessageLoop")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( pbx.Model.ClientMsg.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( pbx.Model.ServerMsg.getDefaultInstance())) .build(); } } } return getMessageLoopMethod; } /** * Creates a new async stub that supports all call types for the service */ public static NodeStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public NodeStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new NodeStub(channel, callOptions); } }; return NodeStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static NodeBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public NodeBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new NodeBlockingStub(channel, callOptions); } }; return NodeBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static NodeFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public NodeFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new NodeFutureStub(channel, callOptions); } }; return NodeFutureStub.newStub(factory, channel); } /** *
   * This is the single method that needs to be implemented by a gRPC client.
   * 
*/ public interface AsyncService { /** *
     * Client sends a stream of ClientMsg, server responds with a stream of ServerMsg
     * 
*/ default io.grpc.stub.StreamObserver messageLoop( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getMessageLoopMethod(), responseObserver); } } /** * Base class for the server implementation of the service Node. *
   * This is the single method that needs to be implemented by a gRPC client.
   * 
*/ public static abstract class NodeImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return NodeGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service Node. *
   * This is the single method that needs to be implemented by a gRPC client.
   * 
*/ public static final class NodeStub extends io.grpc.stub.AbstractAsyncStub { private NodeStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected NodeStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new NodeStub(channel, callOptions); } /** *
     * Client sends a stream of ClientMsg, server responds with a stream of ServerMsg
     * 
*/ public io.grpc.stub.StreamObserver messageLoop( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getMessageLoopMethod(), getCallOptions()), responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service Node. *
   * This is the single method that needs to be implemented by a gRPC client.
   * 
*/ public static final class NodeBlockingStub extends io.grpc.stub.AbstractBlockingStub { private NodeBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected NodeBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new NodeBlockingStub(channel, callOptions); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service Node. *
   * This is the single method that needs to be implemented by a gRPC client.
   * 
*/ public static final class NodeFutureStub extends io.grpc.stub.AbstractFutureStub { private NodeFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected NodeFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new NodeFutureStub(channel, callOptions); } } private static final int METHODID_MESSAGE_LOOP = 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 AsyncService serviceImpl; private final int methodId; MethodHandlers(AsyncService 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) { default: throw new AssertionError(); } } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke( io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_MESSAGE_LOOP: return (io.grpc.stub.StreamObserver) serviceImpl.messageLoop( (io.grpc.stub.StreamObserver) responseObserver); default: throw new AssertionError(); } } } public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getMessageLoopMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< pbx.Model.ClientMsg, pbx.Model.ServerMsg>( service, METHODID_MESSAGE_LOOP))) .build(); } private static volatile io.grpc.ServiceDescriptor serviceDescriptor; public static io.grpc.ServiceDescriptor getServiceDescriptor() { io.grpc.ServiceDescriptor result = serviceDescriptor; if (result == null) { synchronized (NodeGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .addMethod(getMessageLoopMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy