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

io.reacted.drivers.channels.grpc.ReActedLinkGrpc Maven / Gradle / Ivy

There is a newer version: 2.1.4
Show newest version
package io.reacted.drivers.channels.grpc;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.51.0)",
    comments = "Source: ReActedLink.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ReActedLinkGrpc {

  private ReActedLinkGrpc() {}

  public static final String SERVICE_NAME = "io.reacted.drivers.channels.grpc.ReActedLink";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "Link",
      requestType = io.reacted.drivers.channels.grpc.ReActedLinkProtocol.ReActedDatagram.class,
      responseType = com.google.protobuf.Empty.class,
      methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
  public static io.grpc.MethodDescriptor getLinkMethod() {
    io.grpc.MethodDescriptor getLinkMethod;
    if ((getLinkMethod = ReActedLinkGrpc.getLinkMethod) == null) {
      synchronized (ReActedLinkGrpc.class) {
        if ((getLinkMethod = ReActedLinkGrpc.getLinkMethod) == null) {
          ReActedLinkGrpc.getLinkMethod = getLinkMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Link"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  io.reacted.drivers.channels.grpc.ReActedLinkProtocol.ReActedDatagram.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.protobuf.Empty.getDefaultInstance()))
              .setSchemaDescriptor(new ReActedLinkMethodDescriptorSupplier("Link"))
              .build();
        }
      }
    }
    return getLinkMethod;
  }

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

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

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

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

    /**
     */
    public io.grpc.stub.StreamObserver link(
        io.grpc.stub.StreamObserver responseObserver) {
      return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getLinkMethod(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getLinkMethod(),
            io.grpc.stub.ServerCalls.asyncClientStreamingCall(
              new MethodHandlers<
                io.reacted.drivers.channels.grpc.ReActedLinkProtocol.ReActedDatagram,
                com.google.protobuf.Empty>(
                  this, METHODID_LINK)))
          .build();
    }
  }

  /**
   */
  public static final class ReActedLinkStub extends io.grpc.stub.AbstractAsyncStub {
    private ReActedLinkStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected ReActedLinkStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new ReActedLinkStub(channel, callOptions);
    }

    /**
     */
    public io.grpc.stub.StreamObserver link(
        io.grpc.stub.StreamObserver responseObserver) {
      return io.grpc.stub.ClientCalls.asyncClientStreamingCall(
          getChannel().newCall(getLinkMethod(), getCallOptions()), responseObserver);
    }
  }

  /**
   */
  public static final class ReActedLinkBlockingStub extends io.grpc.stub.AbstractBlockingStub {
    private ReActedLinkBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected ReActedLinkBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new ReActedLinkBlockingStub(channel, callOptions);
    }
  }

  /**
   */
  public static final class ReActedLinkFutureStub extends io.grpc.stub.AbstractFutureStub {
    private ReActedLinkFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected ReActedLinkFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new ReActedLinkFutureStub(channel, callOptions);
    }
  }

  private static final int METHODID_LINK = 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 ReActedLinkImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(ReActedLinkImplBase 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_LINK:
          return (io.grpc.stub.StreamObserver) serviceImpl.link(
              (io.grpc.stub.StreamObserver) responseObserver);
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class ReActedLinkBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    ReActedLinkBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return io.reacted.drivers.channels.grpc.ReActedLinkProtocol.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("ReActedLink");
    }
  }

  private static final class ReActedLinkFileDescriptorSupplier
      extends ReActedLinkBaseDescriptorSupplier {
    ReActedLinkFileDescriptorSupplier() {}
  }

  private static final class ReActedLinkMethodDescriptorSupplier
      extends ReActedLinkBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    ReActedLinkMethodDescriptorSupplier(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 (ReActedLinkGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new ReActedLinkFileDescriptorSupplier())
              .addMethod(getLinkMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy