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

ru.tinkoff.piapi.contract.v1.OrdersStreamServiceGrpc Maven / Gradle / Ivy

There is a newer version: 1.25
Show newest version
package ru.tinkoff.piapi.contract.v1;

import static io.grpc.MethodDescriptor.generateFullMethodName;

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

  private OrdersStreamServiceGrpc() {}

  public static final String SERVICE_NAME = "tinkoff.public.invest.api.contract.v1.OrdersStreamService";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "TradesStream",
      requestType = ru.tinkoff.piapi.contract.v1.TradesStreamRequest.class,
      responseType = ru.tinkoff.piapi.contract.v1.TradesStreamResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor getTradesStreamMethod() {
    io.grpc.MethodDescriptor getTradesStreamMethod;
    if ((getTradesStreamMethod = OrdersStreamServiceGrpc.getTradesStreamMethod) == null) {
      synchronized (OrdersStreamServiceGrpc.class) {
        if ((getTradesStreamMethod = OrdersStreamServiceGrpc.getTradesStreamMethod) == null) {
          OrdersStreamServiceGrpc.getTradesStreamMethod = getTradesStreamMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TradesStream"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  ru.tinkoff.piapi.contract.v1.TradesStreamRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  ru.tinkoff.piapi.contract.v1.TradesStreamResponse.getDefaultInstance()))
              .setSchemaDescriptor(new OrdersStreamServiceMethodDescriptorSupplier("TradesStream"))
              .build();
        }
      }
    }
    return getTradesStreamMethod;
  }

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

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

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

  /**
   */
  public interface AsyncService {

    /**
     * 
     *Stream сделок пользователя
     * 
*/ default void tradesStream(ru.tinkoff.piapi.contract.v1.TradesStreamRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTradesStreamMethod(), responseObserver); } } /** * Base class for the server implementation of the service OrdersStreamService. */ public static abstract class OrdersStreamServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return OrdersStreamServiceGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service OrdersStreamService. */ public static final class OrdersStreamServiceStub extends io.grpc.stub.AbstractAsyncStub { private OrdersStreamServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected OrdersStreamServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new OrdersStreamServiceStub(channel, callOptions); } /** *
     *Stream сделок пользователя
     * 
*/ public void tradesStream(ru.tinkoff.piapi.contract.v1.TradesStreamRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncServerStreamingCall( getChannel().newCall(getTradesStreamMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service OrdersStreamService. */ public static final class OrdersStreamServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private OrdersStreamServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected OrdersStreamServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new OrdersStreamServiceBlockingStub(channel, callOptions); } /** *
     *Stream сделок пользователя
     * 
*/ public java.util.Iterator tradesStream( ru.tinkoff.piapi.contract.v1.TradesStreamRequest request) { return io.grpc.stub.ClientCalls.blockingServerStreamingCall( getChannel(), getTradesStreamMethod(), getCallOptions(), request); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service OrdersStreamService. */ public static final class OrdersStreamServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private OrdersStreamServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected OrdersStreamServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new OrdersStreamServiceFutureStub(channel, callOptions); } } private static final int METHODID_TRADES_STREAM = 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) { case METHODID_TRADES_STREAM: serviceImpl.tradesStream((ru.tinkoff.piapi.contract.v1.TradesStreamRequest) 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(); } } } public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getTradesStreamMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( new MethodHandlers< ru.tinkoff.piapi.contract.v1.TradesStreamRequest, ru.tinkoff.piapi.contract.v1.TradesStreamResponse>( service, METHODID_TRADES_STREAM))) .build(); } private static abstract class OrdersStreamServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { OrdersStreamServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return ru.tinkoff.piapi.contract.v1.Orders.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("OrdersStreamService"); } } private static final class OrdersStreamServiceFileDescriptorSupplier extends OrdersStreamServiceBaseDescriptorSupplier { OrdersStreamServiceFileDescriptorSupplier() {} } private static final class OrdersStreamServiceMethodDescriptorSupplier extends OrdersStreamServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; OrdersStreamServiceMethodDescriptorSupplier(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 (OrdersStreamServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new OrdersStreamServiceFileDescriptorSupplier()) .addMethod(getTradesStreamMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy