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.MarketDataStreamServiceGrpc 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: marketdata.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class MarketDataStreamServiceGrpc {
private MarketDataStreamServiceGrpc() {}
public static final String SERVICE_NAME = "tinkoff.public.invest.api.contract.v1.MarketDataStreamService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getMarketDataStreamMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "MarketDataStream",
requestType = ru.tinkoff.piapi.contract.v1.MarketDataRequest.class,
responseType = ru.tinkoff.piapi.contract.v1.MarketDataResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getMarketDataStreamMethod() {
io.grpc.MethodDescriptor getMarketDataStreamMethod;
if ((getMarketDataStreamMethod = MarketDataStreamServiceGrpc.getMarketDataStreamMethod) == null) {
synchronized (MarketDataStreamServiceGrpc.class) {
if ((getMarketDataStreamMethod = MarketDataStreamServiceGrpc.getMarketDataStreamMethod) == null) {
MarketDataStreamServiceGrpc.getMarketDataStreamMethod = getMarketDataStreamMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "MarketDataStream"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ru.tinkoff.piapi.contract.v1.MarketDataRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ru.tinkoff.piapi.contract.v1.MarketDataResponse.getDefaultInstance()))
.setSchemaDescriptor(new MarketDataStreamServiceMethodDescriptorSupplier("MarketDataStream"))
.build();
}
}
}
return getMarketDataStreamMethod;
}
private static volatile io.grpc.MethodDescriptor getMarketDataServerSideStreamMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "MarketDataServerSideStream",
requestType = ru.tinkoff.piapi.contract.v1.MarketDataServerSideStreamRequest.class,
responseType = ru.tinkoff.piapi.contract.v1.MarketDataResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getMarketDataServerSideStreamMethod() {
io.grpc.MethodDescriptor getMarketDataServerSideStreamMethod;
if ((getMarketDataServerSideStreamMethod = MarketDataStreamServiceGrpc.getMarketDataServerSideStreamMethod) == null) {
synchronized (MarketDataStreamServiceGrpc.class) {
if ((getMarketDataServerSideStreamMethod = MarketDataStreamServiceGrpc.getMarketDataServerSideStreamMethod) == null) {
MarketDataStreamServiceGrpc.getMarketDataServerSideStreamMethod = getMarketDataServerSideStreamMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "MarketDataServerSideStream"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ru.tinkoff.piapi.contract.v1.MarketDataServerSideStreamRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ru.tinkoff.piapi.contract.v1.MarketDataResponse.getDefaultInstance()))
.setSchemaDescriptor(new MarketDataStreamServiceMethodDescriptorSupplier("MarketDataServerSideStream"))
.build();
}
}
}
return getMarketDataServerSideStreamMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static MarketDataStreamServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MarketDataStreamServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MarketDataStreamServiceStub(channel, callOptions);
}
};
return MarketDataStreamServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static MarketDataStreamServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MarketDataStreamServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MarketDataStreamServiceBlockingStub(channel, callOptions);
}
};
return MarketDataStreamServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static MarketDataStreamServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MarketDataStreamServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MarketDataStreamServiceFutureStub(channel, callOptions);
}
};
return MarketDataStreamServiceFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*
*Bi-directional стрим предоставления биржевой информации.
*
*/
default io.grpc.stub.StreamObserver marketDataStream(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getMarketDataStreamMethod(), responseObserver);
}
/**
*
*Server-side стрим предоставления биржевой информации.
*
*/
default void marketDataServerSideStream(ru.tinkoff.piapi.contract.v1.MarketDataServerSideStreamRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMarketDataServerSideStreamMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service MarketDataStreamService.
*/
public static abstract class MarketDataStreamServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return MarketDataStreamServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service MarketDataStreamService.
*/
public static final class MarketDataStreamServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private MarketDataStreamServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MarketDataStreamServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MarketDataStreamServiceStub(channel, callOptions);
}
/**
*
*Bi-directional стрим предоставления биржевой информации.
*
*/
public io.grpc.stub.StreamObserver marketDataStream(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
getChannel().newCall(getMarketDataStreamMethod(), getCallOptions()), responseObserver);
}
/**
*
*Server-side стрим предоставления биржевой информации.
*
*/
public void marketDataServerSideStream(ru.tinkoff.piapi.contract.v1.MarketDataServerSideStreamRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getMarketDataServerSideStreamMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service MarketDataStreamService.
*/
public static final class MarketDataStreamServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private MarketDataStreamServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MarketDataStreamServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MarketDataStreamServiceBlockingStub(channel, callOptions);
}
/**
*
*Server-side стрим предоставления биржевой информации.
*
*/
public java.util.Iterator marketDataServerSideStream(
ru.tinkoff.piapi.contract.v1.MarketDataServerSideStreamRequest request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getMarketDataServerSideStreamMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service MarketDataStreamService.
*/
public static final class MarketDataStreamServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private MarketDataStreamServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MarketDataStreamServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MarketDataStreamServiceFutureStub(channel, callOptions);
}
}
private static final int METHODID_MARKET_DATA_SERVER_SIDE_STREAM = 0;
private static final int METHODID_MARKET_DATA_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_MARKET_DATA_SERVER_SIDE_STREAM:
serviceImpl.marketDataServerSideStream((ru.tinkoff.piapi.contract.v1.MarketDataServerSideStreamRequest) 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) {
case METHODID_MARKET_DATA_STREAM:
return (io.grpc.stub.StreamObserver) serviceImpl.marketDataStream(
(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(
getMarketDataStreamMethod(),
io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
new MethodHandlers<
ru.tinkoff.piapi.contract.v1.MarketDataRequest,
ru.tinkoff.piapi.contract.v1.MarketDataResponse>(
service, METHODID_MARKET_DATA_STREAM)))
.addMethod(
getMarketDataServerSideStreamMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
ru.tinkoff.piapi.contract.v1.MarketDataServerSideStreamRequest,
ru.tinkoff.piapi.contract.v1.MarketDataResponse>(
service, METHODID_MARKET_DATA_SERVER_SIDE_STREAM)))
.build();
}
private static abstract class MarketDataStreamServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
MarketDataStreamServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return ru.tinkoff.piapi.contract.v1.Marketdata.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("MarketDataStreamService");
}
}
private static final class MarketDataStreamServiceFileDescriptorSupplier
extends MarketDataStreamServiceBaseDescriptorSupplier {
MarketDataStreamServiceFileDescriptorSupplier() {}
}
private static final class MarketDataStreamServiceMethodDescriptorSupplier
extends MarketDataStreamServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
MarketDataStreamServiceMethodDescriptorSupplier(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 (MarketDataStreamServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new MarketDataStreamServiceFileDescriptorSupplier())
.addMethod(getMarketDataStreamMethod())
.addMethod(getMarketDataServerSideStreamMethod())
.build();
}
}
}
return result;
}
}