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

ru.tinkoff.piapi.contract.v1.OrdersServiceGrpc 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;

/**
 * 
 * Сервис предназначен для работы с торговыми поручениями:</br> **1**.
 *выставление;</br> **2**. отмена;</br> **3**. получение статуса;</br> **4**.
 *расчёт полной стоимости;</br> **5**. получение списка заявок.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.56.1)", comments = "Source: orders.proto") @io.grpc.stub.annotations.GrpcGenerated public final class OrdersServiceGrpc { private OrdersServiceGrpc() {} public static final String SERVICE_NAME = "tinkoff.public.invest.api.contract.v1.OrdersService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getPostOrderMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "PostOrder", requestType = ru.tinkoff.piapi.contract.v1.PostOrderRequest.class, responseType = ru.tinkoff.piapi.contract.v1.PostOrderResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getPostOrderMethod() { io.grpc.MethodDescriptor getPostOrderMethod; if ((getPostOrderMethod = OrdersServiceGrpc.getPostOrderMethod) == null) { synchronized (OrdersServiceGrpc.class) { if ((getPostOrderMethod = OrdersServiceGrpc.getPostOrderMethod) == null) { OrdersServiceGrpc.getPostOrderMethod = getPostOrderMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PostOrder")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.PostOrderRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.PostOrderResponse.getDefaultInstance())) .setSchemaDescriptor(new OrdersServiceMethodDescriptorSupplier("PostOrder")) .build(); } } } return getPostOrderMethod; } private static volatile io.grpc.MethodDescriptor getCancelOrderMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "CancelOrder", requestType = ru.tinkoff.piapi.contract.v1.CancelOrderRequest.class, responseType = ru.tinkoff.piapi.contract.v1.CancelOrderResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getCancelOrderMethod() { io.grpc.MethodDescriptor getCancelOrderMethod; if ((getCancelOrderMethod = OrdersServiceGrpc.getCancelOrderMethod) == null) { synchronized (OrdersServiceGrpc.class) { if ((getCancelOrderMethod = OrdersServiceGrpc.getCancelOrderMethod) == null) { OrdersServiceGrpc.getCancelOrderMethod = getCancelOrderMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CancelOrder")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.CancelOrderRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.CancelOrderResponse.getDefaultInstance())) .setSchemaDescriptor(new OrdersServiceMethodDescriptorSupplier("CancelOrder")) .build(); } } } return getCancelOrderMethod; } private static volatile io.grpc.MethodDescriptor getGetOrderStateMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetOrderState", requestType = ru.tinkoff.piapi.contract.v1.GetOrderStateRequest.class, responseType = ru.tinkoff.piapi.contract.v1.OrderState.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetOrderStateMethod() { io.grpc.MethodDescriptor getGetOrderStateMethod; if ((getGetOrderStateMethod = OrdersServiceGrpc.getGetOrderStateMethod) == null) { synchronized (OrdersServiceGrpc.class) { if ((getGetOrderStateMethod = OrdersServiceGrpc.getGetOrderStateMethod) == null) { OrdersServiceGrpc.getGetOrderStateMethod = getGetOrderStateMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOrderState")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetOrderStateRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.OrderState.getDefaultInstance())) .setSchemaDescriptor(new OrdersServiceMethodDescriptorSupplier("GetOrderState")) .build(); } } } return getGetOrderStateMethod; } private static volatile io.grpc.MethodDescriptor getGetOrdersMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetOrders", requestType = ru.tinkoff.piapi.contract.v1.GetOrdersRequest.class, responseType = ru.tinkoff.piapi.contract.v1.GetOrdersResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetOrdersMethod() { io.grpc.MethodDescriptor getGetOrdersMethod; if ((getGetOrdersMethod = OrdersServiceGrpc.getGetOrdersMethod) == null) { synchronized (OrdersServiceGrpc.class) { if ((getGetOrdersMethod = OrdersServiceGrpc.getGetOrdersMethod) == null) { OrdersServiceGrpc.getGetOrdersMethod = getGetOrdersMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOrders")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetOrdersRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetOrdersResponse.getDefaultInstance())) .setSchemaDescriptor(new OrdersServiceMethodDescriptorSupplier("GetOrders")) .build(); } } } return getGetOrdersMethod; } private static volatile io.grpc.MethodDescriptor getReplaceOrderMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ReplaceOrder", requestType = ru.tinkoff.piapi.contract.v1.ReplaceOrderRequest.class, responseType = ru.tinkoff.piapi.contract.v1.PostOrderResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getReplaceOrderMethod() { io.grpc.MethodDescriptor getReplaceOrderMethod; if ((getReplaceOrderMethod = OrdersServiceGrpc.getReplaceOrderMethod) == null) { synchronized (OrdersServiceGrpc.class) { if ((getReplaceOrderMethod = OrdersServiceGrpc.getReplaceOrderMethod) == null) { OrdersServiceGrpc.getReplaceOrderMethod = getReplaceOrderMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReplaceOrder")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.ReplaceOrderRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.PostOrderResponse.getDefaultInstance())) .setSchemaDescriptor(new OrdersServiceMethodDescriptorSupplier("ReplaceOrder")) .build(); } } } return getReplaceOrderMethod; } private static volatile io.grpc.MethodDescriptor getGetMaxLotsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetMaxLots", requestType = ru.tinkoff.piapi.contract.v1.GetMaxLotsRequest.class, responseType = ru.tinkoff.piapi.contract.v1.GetMaxLotsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGetMaxLotsMethod() { io.grpc.MethodDescriptor getGetMaxLotsMethod; if ((getGetMaxLotsMethod = OrdersServiceGrpc.getGetMaxLotsMethod) == null) { synchronized (OrdersServiceGrpc.class) { if ((getGetMaxLotsMethod = OrdersServiceGrpc.getGetMaxLotsMethod) == null) { OrdersServiceGrpc.getGetMaxLotsMethod = getGetMaxLotsMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMaxLots")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetMaxLotsRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ru.tinkoff.piapi.contract.v1.GetMaxLotsResponse.getDefaultInstance())) .setSchemaDescriptor(new OrdersServiceMethodDescriptorSupplier("GetMaxLots")) .build(); } } } return getGetMaxLotsMethod; } /** * Creates a new async stub that supports all call types for the service */ public static OrdersServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public OrdersServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new OrdersServiceStub(channel, callOptions); } }; return OrdersServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static OrdersServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public OrdersServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new OrdersServiceBlockingStub(channel, callOptions); } }; return OrdersServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static OrdersServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public OrdersServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new OrdersServiceFutureStub(channel, callOptions); } }; return OrdersServiceFutureStub.newStub(factory, channel); } /** *
   * Сервис предназначен для работы с торговыми поручениями:</br> **1**.
   *выставление;</br> **2**. отмена;</br> **3**. получение статуса;</br> **4**.
   *расчёт полной стоимости;</br> **5**. получение списка заявок.
   * 
*/ public interface AsyncService { /** *
     *Метод выставления заявки.
     * 
*/ default void postOrder(ru.tinkoff.piapi.contract.v1.PostOrderRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPostOrderMethod(), responseObserver); } /** *
     *Метод отмены биржевой заявки.
     * 
*/ default void cancelOrder(ru.tinkoff.piapi.contract.v1.CancelOrderRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCancelOrderMethod(), responseObserver); } /** *
     *Метод получения статуса торгового поручения.
     * 
*/ default void getOrderState(ru.tinkoff.piapi.contract.v1.GetOrderStateRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOrderStateMethod(), responseObserver); } /** *
     *Метод получения списка активных заявок по счёту.
     * 
*/ default void getOrders(ru.tinkoff.piapi.contract.v1.GetOrdersRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOrdersMethod(), responseObserver); } /** *
     *Метод изменения выставленной заявки.
     * 
*/ default void replaceOrder(ru.tinkoff.piapi.contract.v1.ReplaceOrderRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReplaceOrderMethod(), responseObserver); } /** *
     *расчет количества доступных для покупки/продажи лотов
     * 
*/ default void getMaxLots(ru.tinkoff.piapi.contract.v1.GetMaxLotsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMaxLotsMethod(), responseObserver); } } /** * Base class for the server implementation of the service OrdersService. *
   * Сервис предназначен для работы с торговыми поручениями:</br> **1**.
   *выставление;</br> **2**. отмена;</br> **3**. получение статуса;</br> **4**.
   *расчёт полной стоимости;</br> **5**. получение списка заявок.
   * 
*/ public static abstract class OrdersServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return OrdersServiceGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service OrdersService. *
   * Сервис предназначен для работы с торговыми поручениями:</br> **1**.
   *выставление;</br> **2**. отмена;</br> **3**. получение статуса;</br> **4**.
   *расчёт полной стоимости;</br> **5**. получение списка заявок.
   * 
*/ public static final class OrdersServiceStub extends io.grpc.stub.AbstractAsyncStub { private OrdersServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected OrdersServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new OrdersServiceStub(channel, callOptions); } /** *
     *Метод выставления заявки.
     * 
*/ public void postOrder(ru.tinkoff.piapi.contract.v1.PostOrderRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getPostOrderMethod(), getCallOptions()), request, responseObserver); } /** *
     *Метод отмены биржевой заявки.
     * 
*/ public void cancelOrder(ru.tinkoff.piapi.contract.v1.CancelOrderRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getCancelOrderMethod(), getCallOptions()), request, responseObserver); } /** *
     *Метод получения статуса торгового поручения.
     * 
*/ public void getOrderState(ru.tinkoff.piapi.contract.v1.GetOrderStateRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetOrderStateMethod(), getCallOptions()), request, responseObserver); } /** *
     *Метод получения списка активных заявок по счёту.
     * 
*/ public void getOrders(ru.tinkoff.piapi.contract.v1.GetOrdersRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetOrdersMethod(), getCallOptions()), request, responseObserver); } /** *
     *Метод изменения выставленной заявки.
     * 
*/ public void replaceOrder(ru.tinkoff.piapi.contract.v1.ReplaceOrderRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getReplaceOrderMethod(), getCallOptions()), request, responseObserver); } /** *
     *расчет количества доступных для покупки/продажи лотов
     * 
*/ public void getMaxLots(ru.tinkoff.piapi.contract.v1.GetMaxLotsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetMaxLotsMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service OrdersService. *
   * Сервис предназначен для работы с торговыми поручениями:</br> **1**.
   *выставление;</br> **2**. отмена;</br> **3**. получение статуса;</br> **4**.
   *расчёт полной стоимости;</br> **5**. получение списка заявок.
   * 
*/ public static final class OrdersServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private OrdersServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected OrdersServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new OrdersServiceBlockingStub(channel, callOptions); } /** *
     *Метод выставления заявки.
     * 
*/ public ru.tinkoff.piapi.contract.v1.PostOrderResponse postOrder(ru.tinkoff.piapi.contract.v1.PostOrderRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPostOrderMethod(), getCallOptions(), request); } /** *
     *Метод отмены биржевой заявки.
     * 
*/ public ru.tinkoff.piapi.contract.v1.CancelOrderResponse cancelOrder(ru.tinkoff.piapi.contract.v1.CancelOrderRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getCancelOrderMethod(), getCallOptions(), request); } /** *
     *Метод получения статуса торгового поручения.
     * 
*/ public ru.tinkoff.piapi.contract.v1.OrderState getOrderState(ru.tinkoff.piapi.contract.v1.GetOrderStateRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetOrderStateMethod(), getCallOptions(), request); } /** *
     *Метод получения списка активных заявок по счёту.
     * 
*/ public ru.tinkoff.piapi.contract.v1.GetOrdersResponse getOrders(ru.tinkoff.piapi.contract.v1.GetOrdersRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetOrdersMethod(), getCallOptions(), request); } /** *
     *Метод изменения выставленной заявки.
     * 
*/ public ru.tinkoff.piapi.contract.v1.PostOrderResponse replaceOrder(ru.tinkoff.piapi.contract.v1.ReplaceOrderRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getReplaceOrderMethod(), getCallOptions(), request); } /** *
     *расчет количества доступных для покупки/продажи лотов
     * 
*/ public ru.tinkoff.piapi.contract.v1.GetMaxLotsResponse getMaxLots(ru.tinkoff.piapi.contract.v1.GetMaxLotsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetMaxLotsMethod(), getCallOptions(), request); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service OrdersService. *
   * Сервис предназначен для работы с торговыми поручениями:</br> **1**.
   *выставление;</br> **2**. отмена;</br> **3**. получение статуса;</br> **4**.
   *расчёт полной стоимости;</br> **5**. получение списка заявок.
   * 
*/ public static final class OrdersServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private OrdersServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected OrdersServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new OrdersServiceFutureStub(channel, callOptions); } /** *
     *Метод выставления заявки.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture postOrder( ru.tinkoff.piapi.contract.v1.PostOrderRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPostOrderMethod(), getCallOptions()), request); } /** *
     *Метод отмены биржевой заявки.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture cancelOrder( ru.tinkoff.piapi.contract.v1.CancelOrderRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getCancelOrderMethod(), getCallOptions()), request); } /** *
     *Метод получения статуса торгового поручения.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture getOrderState( ru.tinkoff.piapi.contract.v1.GetOrderStateRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetOrderStateMethod(), getCallOptions()), request); } /** *
     *Метод получения списка активных заявок по счёту.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture getOrders( ru.tinkoff.piapi.contract.v1.GetOrdersRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetOrdersMethod(), getCallOptions()), request); } /** *
     *Метод изменения выставленной заявки.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture replaceOrder( ru.tinkoff.piapi.contract.v1.ReplaceOrderRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getReplaceOrderMethod(), getCallOptions()), request); } /** *
     *расчет количества доступных для покупки/продажи лотов
     * 
*/ public com.google.common.util.concurrent.ListenableFuture getMaxLots( ru.tinkoff.piapi.contract.v1.GetMaxLotsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetMaxLotsMethod(), getCallOptions()), request); } } private static final int METHODID_POST_ORDER = 0; private static final int METHODID_CANCEL_ORDER = 1; private static final int METHODID_GET_ORDER_STATE = 2; private static final int METHODID_GET_ORDERS = 3; private static final int METHODID_REPLACE_ORDER = 4; private static final int METHODID_GET_MAX_LOTS = 5; 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_POST_ORDER: serviceImpl.postOrder((ru.tinkoff.piapi.contract.v1.PostOrderRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_CANCEL_ORDER: serviceImpl.cancelOrder((ru.tinkoff.piapi.contract.v1.CancelOrderRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_ORDER_STATE: serviceImpl.getOrderState((ru.tinkoff.piapi.contract.v1.GetOrderStateRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_ORDERS: serviceImpl.getOrders((ru.tinkoff.piapi.contract.v1.GetOrdersRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_REPLACE_ORDER: serviceImpl.replaceOrder((ru.tinkoff.piapi.contract.v1.ReplaceOrderRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GET_MAX_LOTS: serviceImpl.getMaxLots((ru.tinkoff.piapi.contract.v1.GetMaxLotsRequest) 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( getPostOrderMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ru.tinkoff.piapi.contract.v1.PostOrderRequest, ru.tinkoff.piapi.contract.v1.PostOrderResponse>( service, METHODID_POST_ORDER))) .addMethod( getCancelOrderMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ru.tinkoff.piapi.contract.v1.CancelOrderRequest, ru.tinkoff.piapi.contract.v1.CancelOrderResponse>( service, METHODID_CANCEL_ORDER))) .addMethod( getGetOrderStateMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ru.tinkoff.piapi.contract.v1.GetOrderStateRequest, ru.tinkoff.piapi.contract.v1.OrderState>( service, METHODID_GET_ORDER_STATE))) .addMethod( getGetOrdersMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ru.tinkoff.piapi.contract.v1.GetOrdersRequest, ru.tinkoff.piapi.contract.v1.GetOrdersResponse>( service, METHODID_GET_ORDERS))) .addMethod( getReplaceOrderMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ru.tinkoff.piapi.contract.v1.ReplaceOrderRequest, ru.tinkoff.piapi.contract.v1.PostOrderResponse>( service, METHODID_REPLACE_ORDER))) .addMethod( getGetMaxLotsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ru.tinkoff.piapi.contract.v1.GetMaxLotsRequest, ru.tinkoff.piapi.contract.v1.GetMaxLotsResponse>( service, METHODID_GET_MAX_LOTS))) .build(); } private static abstract class OrdersServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { OrdersServiceBaseDescriptorSupplier() {} @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("OrdersService"); } } private static final class OrdersServiceFileDescriptorSupplier extends OrdersServiceBaseDescriptorSupplier { OrdersServiceFileDescriptorSupplier() {} } private static final class OrdersServiceMethodDescriptorSupplier extends OrdersServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; OrdersServiceMethodDescriptorSupplier(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 (OrdersServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new OrdersServiceFileDescriptorSupplier()) .addMethod(getPostOrderMethod()) .addMethod(getCancelOrderMethod()) .addMethod(getGetOrderStateMethod()) .addMethod(getGetOrdersMethod()) .addMethod(getReplaceOrderMethod()) .addMethod(getGetMaxLotsMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy