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

com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdatesApiGrpc Maven / Gradle / Ivy

There is a newer version: 1.5.2
Show newest version
package com.wavesplatform.events.api.grpc.protobuf;

import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.25.0)",
    comments = "Source: waves/events/grpc/blockchain_updates.proto")
public final class BlockchainUpdatesApiGrpc {

  private BlockchainUpdatesApiGrpc() {}

  public static final String SERVICE_NAME = "waves.events.grpc.BlockchainUpdatesApi";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetBlockUpdate",
      requestType = com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdateRequest.class,
      responseType = com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdateResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetBlockUpdateMethod() {
    io.grpc.MethodDescriptor getGetBlockUpdateMethod;
    if ((getGetBlockUpdateMethod = BlockchainUpdatesApiGrpc.getGetBlockUpdateMethod) == null) {
      synchronized (BlockchainUpdatesApiGrpc.class) {
        if ((getGetBlockUpdateMethod = BlockchainUpdatesApiGrpc.getGetBlockUpdateMethod) == null) {
          BlockchainUpdatesApiGrpc.getGetBlockUpdateMethod = getGetBlockUpdateMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlockUpdate"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdateRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdateResponse.getDefaultInstance()))
              .setSchemaDescriptor(new BlockchainUpdatesApiMethodDescriptorSupplier("GetBlockUpdate"))
              .build();
        }
      }
    }
    return getGetBlockUpdateMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetBlockUpdatesRangeMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetBlockUpdatesRange",
      requestType = com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdatesRangeRequest.class,
      responseType = com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdatesRangeResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetBlockUpdatesRangeMethod() {
    io.grpc.MethodDescriptor getGetBlockUpdatesRangeMethod;
    if ((getGetBlockUpdatesRangeMethod = BlockchainUpdatesApiGrpc.getGetBlockUpdatesRangeMethod) == null) {
      synchronized (BlockchainUpdatesApiGrpc.class) {
        if ((getGetBlockUpdatesRangeMethod = BlockchainUpdatesApiGrpc.getGetBlockUpdatesRangeMethod) == null) {
          BlockchainUpdatesApiGrpc.getGetBlockUpdatesRangeMethod = getGetBlockUpdatesRangeMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlockUpdatesRange"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdatesRangeRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdatesRangeResponse.getDefaultInstance()))
              .setSchemaDescriptor(new BlockchainUpdatesApiMethodDescriptorSupplier("GetBlockUpdatesRange"))
              .build();
        }
      }
    }
    return getGetBlockUpdatesRangeMethod;
  }

  private static volatile io.grpc.MethodDescriptor getSubscribeMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "Subscribe",
      requestType = com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.SubscribeRequest.class,
      responseType = com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.SubscribeEvent.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor getSubscribeMethod() {
    io.grpc.MethodDescriptor getSubscribeMethod;
    if ((getSubscribeMethod = BlockchainUpdatesApiGrpc.getSubscribeMethod) == null) {
      synchronized (BlockchainUpdatesApiGrpc.class) {
        if ((getSubscribeMethod = BlockchainUpdatesApiGrpc.getSubscribeMethod) == null) {
          BlockchainUpdatesApiGrpc.getSubscribeMethod = getSubscribeMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Subscribe"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.SubscribeRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.SubscribeEvent.getDefaultInstance()))
              .setSchemaDescriptor(new BlockchainUpdatesApiMethodDescriptorSupplier("Subscribe"))
              .build();
        }
      }
    }
    return getSubscribeMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static BlockchainUpdatesApiStub newStub(io.grpc.Channel channel) {
    return new BlockchainUpdatesApiStub(channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static BlockchainUpdatesApiBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    return new BlockchainUpdatesApiBlockingStub(channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static BlockchainUpdatesApiFutureStub newFutureStub(
      io.grpc.Channel channel) {
    return new BlockchainUpdatesApiFutureStub(channel);
  }

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

    /**
     */
    public void getBlockUpdate(com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdateRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnimplementedUnaryCall(getGetBlockUpdateMethod(), responseObserver);
    }

    /**
     */
    public void getBlockUpdatesRange(com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdatesRangeRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnimplementedUnaryCall(getGetBlockUpdatesRangeMethod(), responseObserver);
    }

    /**
     */
    public void subscribe(com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.SubscribeRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnimplementedUnaryCall(getSubscribeMethod(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getGetBlockUpdateMethod(),
            asyncUnaryCall(
              new MethodHandlers<
                com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdateRequest,
                com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdateResponse>(
                  this, METHODID_GET_BLOCK_UPDATE)))
          .addMethod(
            getGetBlockUpdatesRangeMethod(),
            asyncUnaryCall(
              new MethodHandlers<
                com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdatesRangeRequest,
                com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdatesRangeResponse>(
                  this, METHODID_GET_BLOCK_UPDATES_RANGE)))
          .addMethod(
            getSubscribeMethod(),
            asyncServerStreamingCall(
              new MethodHandlers<
                com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.SubscribeRequest,
                com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.SubscribeEvent>(
                  this, METHODID_SUBSCRIBE)))
          .build();
    }
  }

  /**
   */
  public static final class BlockchainUpdatesApiStub extends io.grpc.stub.AbstractStub {
    private BlockchainUpdatesApiStub(io.grpc.Channel channel) {
      super(channel);
    }

    private BlockchainUpdatesApiStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

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

    /**
     */
    public void getBlockUpdate(com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdateRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(getGetBlockUpdateMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getBlockUpdatesRange(com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdatesRangeRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(getGetBlockUpdatesRangeMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void subscribe(com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.SubscribeRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      asyncServerStreamingCall(
          getChannel().newCall(getSubscribeMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   */
  public static final class BlockchainUpdatesApiBlockingStub extends io.grpc.stub.AbstractStub {
    private BlockchainUpdatesApiBlockingStub(io.grpc.Channel channel) {
      super(channel);
    }

    private BlockchainUpdatesApiBlockingStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

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

    /**
     */
    public com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdateResponse getBlockUpdate(com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdateRequest request) {
      return blockingUnaryCall(
          getChannel(), getGetBlockUpdateMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdatesRangeResponse getBlockUpdatesRange(com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdatesRangeRequest request) {
      return blockingUnaryCall(
          getChannel(), getGetBlockUpdatesRangeMethod(), getCallOptions(), request);
    }

    /**
     */
    public java.util.Iterator subscribe(
        com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.SubscribeRequest request) {
      return blockingServerStreamingCall(
          getChannel(), getSubscribeMethod(), getCallOptions(), request);
    }
  }

  /**
   */
  public static final class BlockchainUpdatesApiFutureStub extends io.grpc.stub.AbstractStub {
    private BlockchainUpdatesApiFutureStub(io.grpc.Channel channel) {
      super(channel);
    }

    private BlockchainUpdatesApiFutureStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

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

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getBlockUpdate(
        com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdateRequest request) {
      return futureUnaryCall(
          getChannel().newCall(getGetBlockUpdateMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getBlockUpdatesRange(
        com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdatesRangeRequest request) {
      return futureUnaryCall(
          getChannel().newCall(getGetBlockUpdatesRangeMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_GET_BLOCK_UPDATE = 0;
  private static final int METHODID_GET_BLOCK_UPDATES_RANGE = 1;
  private static final int METHODID_SUBSCRIBE = 2;

  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 BlockchainUpdatesApiImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(BlockchainUpdatesApiImplBase 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_GET_BLOCK_UPDATE:
          serviceImpl.getBlockUpdate((com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdateRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_BLOCK_UPDATES_RANGE:
          serviceImpl.getBlockUpdatesRange((com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.GetBlockUpdatesRangeRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_SUBSCRIBE:
          serviceImpl.subscribe((com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.SubscribeRequest) 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();
      }
    }
  }

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

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return com.wavesplatform.events.api.grpc.protobuf.BlockchainUpdates.getDescriptor();
    }

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

  private static final class BlockchainUpdatesApiFileDescriptorSupplier
      extends BlockchainUpdatesApiBaseDescriptorSupplier {
    BlockchainUpdatesApiFileDescriptorSupplier() {}
  }

  private static final class BlockchainUpdatesApiMethodDescriptorSupplier
      extends BlockchainUpdatesApiBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    BlockchainUpdatesApiMethodDescriptorSupplier(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 (BlockchainUpdatesApiGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new BlockchainUpdatesApiFileDescriptorSupplier())
              .addMethod(getGetBlockUpdateMethod())
              .addMethod(getGetBlockUpdatesRangeMethod())
              .addMethod(getSubscribeMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy