Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
ru.tinkoff.piapi.contract.v1.OperationsStreamServiceGrpc Maven / Gradle / Ivy
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: operations.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class OperationsStreamServiceGrpc {
private OperationsStreamServiceGrpc() {}
public static final String SERVICE_NAME = "tinkoff.public.invest.api.contract.v1.OperationsStreamService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getPortfolioStreamMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "PortfolioStream",
requestType = ru.tinkoff.piapi.contract.v1.PortfolioStreamRequest.class,
responseType = ru.tinkoff.piapi.contract.v1.PortfolioStreamResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getPortfolioStreamMethod() {
io.grpc.MethodDescriptor getPortfolioStreamMethod;
if ((getPortfolioStreamMethod = OperationsStreamServiceGrpc.getPortfolioStreamMethod) == null) {
synchronized (OperationsStreamServiceGrpc.class) {
if ((getPortfolioStreamMethod = OperationsStreamServiceGrpc.getPortfolioStreamMethod) == null) {
OperationsStreamServiceGrpc.getPortfolioStreamMethod = getPortfolioStreamMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "PortfolioStream"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ru.tinkoff.piapi.contract.v1.PortfolioStreamRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ru.tinkoff.piapi.contract.v1.PortfolioStreamResponse.getDefaultInstance()))
.setSchemaDescriptor(new OperationsStreamServiceMethodDescriptorSupplier("PortfolioStream"))
.build();
}
}
}
return getPortfolioStreamMethod;
}
private static volatile io.grpc.MethodDescriptor getPositionsStreamMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "PositionsStream",
requestType = ru.tinkoff.piapi.contract.v1.PositionsStreamRequest.class,
responseType = ru.tinkoff.piapi.contract.v1.PositionsStreamResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getPositionsStreamMethod() {
io.grpc.MethodDescriptor getPositionsStreamMethod;
if ((getPositionsStreamMethod = OperationsStreamServiceGrpc.getPositionsStreamMethod) == null) {
synchronized (OperationsStreamServiceGrpc.class) {
if ((getPositionsStreamMethod = OperationsStreamServiceGrpc.getPositionsStreamMethod) == null) {
OperationsStreamServiceGrpc.getPositionsStreamMethod = getPositionsStreamMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "PositionsStream"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ru.tinkoff.piapi.contract.v1.PositionsStreamRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ru.tinkoff.piapi.contract.v1.PositionsStreamResponse.getDefaultInstance()))
.setSchemaDescriptor(new OperationsStreamServiceMethodDescriptorSupplier("PositionsStream"))
.build();
}
}
}
return getPositionsStreamMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static OperationsStreamServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public OperationsStreamServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new OperationsStreamServiceStub(channel, callOptions);
}
};
return OperationsStreamServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static OperationsStreamServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public OperationsStreamServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new OperationsStreamServiceBlockingStub(channel, callOptions);
}
};
return OperationsStreamServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static OperationsStreamServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public OperationsStreamServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new OperationsStreamServiceFutureStub(channel, callOptions);
}
};
return OperationsStreamServiceFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*
*Server-side stream обновлений портфеля
*
*/
default void portfolioStream(ru.tinkoff.piapi.contract.v1.PortfolioStreamRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPortfolioStreamMethod(), responseObserver);
}
/**
*
*Server-side stream обновлений информации по изменению позиций портфеля
*
*/
default void positionsStream(ru.tinkoff.piapi.contract.v1.PositionsStreamRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPositionsStreamMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service OperationsStreamService.
*/
public static abstract class OperationsStreamServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return OperationsStreamServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service OperationsStreamService.
*/
public static final class OperationsStreamServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private OperationsStreamServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected OperationsStreamServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new OperationsStreamServiceStub(channel, callOptions);
}
/**
*
*Server-side stream обновлений портфеля
*
*/
public void portfolioStream(ru.tinkoff.piapi.contract.v1.PortfolioStreamRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getPortfolioStreamMethod(), getCallOptions()), request, responseObserver);
}
/**
*
*Server-side stream обновлений информации по изменению позиций портфеля
*
*/
public void positionsStream(ru.tinkoff.piapi.contract.v1.PositionsStreamRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getPositionsStreamMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service OperationsStreamService.
*/
public static final class OperationsStreamServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private OperationsStreamServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected OperationsStreamServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new OperationsStreamServiceBlockingStub(channel, callOptions);
}
/**
*
*Server-side stream обновлений портфеля
*
*/
public java.util.Iterator portfolioStream(
ru.tinkoff.piapi.contract.v1.PortfolioStreamRequest request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getPortfolioStreamMethod(), getCallOptions(), request);
}
/**
*
*Server-side stream обновлений информации по изменению позиций портфеля
*
*/
public java.util.Iterator positionsStream(
ru.tinkoff.piapi.contract.v1.PositionsStreamRequest request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getPositionsStreamMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service OperationsStreamService.
*/
public static final class OperationsStreamServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private OperationsStreamServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected OperationsStreamServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new OperationsStreamServiceFutureStub(channel, callOptions);
}
}
private static final int METHODID_PORTFOLIO_STREAM = 0;
private static final int METHODID_POSITIONS_STREAM = 1;
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_PORTFOLIO_STREAM:
serviceImpl.portfolioStream((ru.tinkoff.piapi.contract.v1.PortfolioStreamRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_POSITIONS_STREAM:
serviceImpl.positionsStream((ru.tinkoff.piapi.contract.v1.PositionsStreamRequest) 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(
getPortfolioStreamMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
ru.tinkoff.piapi.contract.v1.PortfolioStreamRequest,
ru.tinkoff.piapi.contract.v1.PortfolioStreamResponse>(
service, METHODID_PORTFOLIO_STREAM)))
.addMethod(
getPositionsStreamMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
ru.tinkoff.piapi.contract.v1.PositionsStreamRequest,
ru.tinkoff.piapi.contract.v1.PositionsStreamResponse>(
service, METHODID_POSITIONS_STREAM)))
.build();
}
private static abstract class OperationsStreamServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
OperationsStreamServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return ru.tinkoff.piapi.contract.v1.Operations.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("OperationsStreamService");
}
}
private static final class OperationsStreamServiceFileDescriptorSupplier
extends OperationsStreamServiceBaseDescriptorSupplier {
OperationsStreamServiceFileDescriptorSupplier() {}
}
private static final class OperationsStreamServiceMethodDescriptorSupplier
extends OperationsStreamServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
OperationsStreamServiceMethodDescriptorSupplier(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 (OperationsStreamServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new OperationsStreamServiceFileDescriptorSupplier())
.addMethod(getPortfolioStreamMethod())
.addMethod(getPositionsStreamMethod())
.build();
}
}
}
return result;
}
}