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

com.wavesplatform.api.grpc.TransactionsApiGrpc Maven / Gradle / Ivy

package com.wavesplatform.api.grpc;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.54.0)",
    comments = "Source: waves/node/grpc/transactions_api.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class TransactionsApiGrpc {

  private TransactionsApiGrpc() {}

  public static final String SERVICE_NAME = "waves.node.grpc.TransactionsApi";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetTransactions",
      requestType = com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest.class,
      responseType = com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor getGetTransactionsMethod() {
    io.grpc.MethodDescriptor getGetTransactionsMethod;
    if ((getGetTransactionsMethod = TransactionsApiGrpc.getGetTransactionsMethod) == null) {
      synchronized (TransactionsApiGrpc.class) {
        if ((getGetTransactionsMethod = TransactionsApiGrpc.getGetTransactionsMethod) == null) {
          TransactionsApiGrpc.getGetTransactionsMethod = getGetTransactionsMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTransactions"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionResponse.getDefaultInstance()))
              .setSchemaDescriptor(new TransactionsApiMethodDescriptorSupplier("GetTransactions"))
              .build();
        }
      }
    }
    return getGetTransactionsMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetStateChangesMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetStateChanges",
      requestType = com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest.class,
      responseType = com.wavesplatform.api.grpc.TransactionsApiOuterClass.InvokeScriptResultResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor getGetStateChangesMethod() {
    io.grpc.MethodDescriptor getGetStateChangesMethod;
    if ((getGetStateChangesMethod = TransactionsApiGrpc.getGetStateChangesMethod) == null) {
      synchronized (TransactionsApiGrpc.class) {
        if ((getGetStateChangesMethod = TransactionsApiGrpc.getGetStateChangesMethod) == null) {
          TransactionsApiGrpc.getGetStateChangesMethod = getGetStateChangesMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStateChanges"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.TransactionsApiOuterClass.InvokeScriptResultResponse.getDefaultInstance()))
              .setSchemaDescriptor(new TransactionsApiMethodDescriptorSupplier("GetStateChanges"))
              .build();
        }
      }
    }
    return getGetStateChangesMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetStatusesMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetStatuses",
      requestType = com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsByIdRequest.class,
      responseType = com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionStatus.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor getGetStatusesMethod() {
    io.grpc.MethodDescriptor getGetStatusesMethod;
    if ((getGetStatusesMethod = TransactionsApiGrpc.getGetStatusesMethod) == null) {
      synchronized (TransactionsApiGrpc.class) {
        if ((getGetStatusesMethod = TransactionsApiGrpc.getGetStatusesMethod) == null) {
          TransactionsApiGrpc.getGetStatusesMethod = getGetStatusesMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStatuses"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsByIdRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionStatus.getDefaultInstance()))
              .setSchemaDescriptor(new TransactionsApiMethodDescriptorSupplier("GetStatuses"))
              .build();
        }
      }
    }
    return getGetStatusesMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetUnconfirmedMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetUnconfirmed",
      requestType = com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest.class,
      responseType = com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
  public static io.grpc.MethodDescriptor getGetUnconfirmedMethod() {
    io.grpc.MethodDescriptor getGetUnconfirmedMethod;
    if ((getGetUnconfirmedMethod = TransactionsApiGrpc.getGetUnconfirmedMethod) == null) {
      synchronized (TransactionsApiGrpc.class) {
        if ((getGetUnconfirmedMethod = TransactionsApiGrpc.getGetUnconfirmedMethod) == null) {
          TransactionsApiGrpc.getGetUnconfirmedMethod = getGetUnconfirmedMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetUnconfirmed"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionResponse.getDefaultInstance()))
              .setSchemaDescriptor(new TransactionsApiMethodDescriptorSupplier("GetUnconfirmed"))
              .build();
        }
      }
    }
    return getGetUnconfirmedMethod;
  }

  private static volatile io.grpc.MethodDescriptor getSignMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "Sign",
      requestType = com.wavesplatform.api.grpc.TransactionsApiOuterClass.SignRequest.class,
      responseType = com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getSignMethod() {
    io.grpc.MethodDescriptor getSignMethod;
    if ((getSignMethod = TransactionsApiGrpc.getSignMethod) == null) {
      synchronized (TransactionsApiGrpc.class) {
        if ((getSignMethod = TransactionsApiGrpc.getSignMethod) == null) {
          TransactionsApiGrpc.getSignMethod = getSignMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Sign"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.api.grpc.TransactionsApiOuterClass.SignRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction.getDefaultInstance()))
              .setSchemaDescriptor(new TransactionsApiMethodDescriptorSupplier("Sign"))
              .build();
        }
      }
    }
    return getSignMethod;
  }

  private static volatile io.grpc.MethodDescriptor getBroadcastMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "Broadcast",
      requestType = com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction.class,
      responseType = com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getBroadcastMethod() {
    io.grpc.MethodDescriptor getBroadcastMethod;
    if ((getBroadcastMethod = TransactionsApiGrpc.getBroadcastMethod) == null) {
      synchronized (TransactionsApiGrpc.class) {
        if ((getBroadcastMethod = TransactionsApiGrpc.getBroadcastMethod) == null) {
          TransactionsApiGrpc.getBroadcastMethod = getBroadcastMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Broadcast"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction.getDefaultInstance()))
              .setSchemaDescriptor(new TransactionsApiMethodDescriptorSupplier("Broadcast"))
              .build();
        }
      }
    }
    return getBroadcastMethod;
  }

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

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

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

  /**
   */
  public interface AsyncService {

    /**
     */
    default void getTransactions(com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTransactionsMethod(), responseObserver);
    }

    /**
     */
    @java.lang.Deprecated
    default void getStateChanges(com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStateChangesMethod(), responseObserver);
    }

    /**
     */
    default void getStatuses(com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsByIdRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStatusesMethod(), responseObserver);
    }

    /**
     */
    default void getUnconfirmed(com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetUnconfirmedMethod(), responseObserver);
    }

    /**
     */
    default void sign(com.wavesplatform.api.grpc.TransactionsApiOuterClass.SignRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSignMethod(), responseObserver);
    }

    /**
     */
    default void broadcast(com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBroadcastMethod(), responseObserver);
    }
  }

  /**
   * Base class for the server implementation of the service TransactionsApi.
   */
  public static abstract class TransactionsApiImplBase
      implements io.grpc.BindableService, AsyncService {

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return TransactionsApiGrpc.bindService(this);
    }
  }

  /**
   * A stub to allow clients to do asynchronous rpc calls to service TransactionsApi.
   */
  public static final class TransactionsApiStub
      extends io.grpc.stub.AbstractAsyncStub {
    private TransactionsApiStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

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

    /**
     */
    public void getTransactions(com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncServerStreamingCall(
          getChannel().newCall(getGetTransactionsMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    @java.lang.Deprecated
    public void getStateChanges(com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncServerStreamingCall(
          getChannel().newCall(getGetStateChangesMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getStatuses(com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsByIdRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncServerStreamingCall(
          getChannel().newCall(getGetStatusesMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getUnconfirmed(com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncServerStreamingCall(
          getChannel().newCall(getGetUnconfirmedMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void sign(com.wavesplatform.api.grpc.TransactionsApiOuterClass.SignRequest request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getSignMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void broadcast(com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getBroadcastMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   * A stub to allow clients to do synchronous rpc calls to service TransactionsApi.
   */
  public static final class TransactionsApiBlockingStub
      extends io.grpc.stub.AbstractBlockingStub {
    private TransactionsApiBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

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

    /**
     */
    public java.util.Iterator getTransactions(
        com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest request) {
      return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
          getChannel(), getGetTransactionsMethod(), getCallOptions(), request);
    }

    /**
     */
    @java.lang.Deprecated
    public java.util.Iterator getStateChanges(
        com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest request) {
      return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
          getChannel(), getGetStateChangesMethod(), getCallOptions(), request);
    }

    /**
     */
    public java.util.Iterator getStatuses(
        com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsByIdRequest request) {
      return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
          getChannel(), getGetStatusesMethod(), getCallOptions(), request);
    }

    /**
     */
    public java.util.Iterator getUnconfirmed(
        com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest request) {
      return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
          getChannel(), getGetUnconfirmedMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction sign(com.wavesplatform.api.grpc.TransactionsApiOuterClass.SignRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getSignMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction broadcast(com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getBroadcastMethod(), getCallOptions(), request);
    }
  }

  /**
   * A stub to allow clients to do ListenableFuture-style rpc calls to service TransactionsApi.
   */
  public static final class TransactionsApiFutureStub
      extends io.grpc.stub.AbstractFutureStub {
    private TransactionsApiFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

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

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture sign(
        com.wavesplatform.api.grpc.TransactionsApiOuterClass.SignRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getSignMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture broadcast(
        com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getBroadcastMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_GET_TRANSACTIONS = 0;
  private static final int METHODID_GET_STATE_CHANGES = 1;
  private static final int METHODID_GET_STATUSES = 2;
  private static final int METHODID_GET_UNCONFIRMED = 3;
  private static final int METHODID_SIGN = 4;
  private static final int METHODID_BROADCAST = 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_GET_TRANSACTIONS:
          serviceImpl.getTransactions((com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_STATE_CHANGES:
          serviceImpl.getStateChanges((com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_STATUSES:
          serviceImpl.getStatuses((com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsByIdRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_UNCONFIRMED:
          serviceImpl.getUnconfirmed((com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_SIGN:
          serviceImpl.sign((com.wavesplatform.api.grpc.TransactionsApiOuterClass.SignRequest) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_BROADCAST:
          serviceImpl.broadcast((com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction) 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(
          getGetTransactionsMethod(),
          io.grpc.stub.ServerCalls.asyncServerStreamingCall(
            new MethodHandlers<
              com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest,
              com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionResponse>(
                service, METHODID_GET_TRANSACTIONS)))
        .addMethod(
          getGetStateChangesMethod(),
          io.grpc.stub.ServerCalls.asyncServerStreamingCall(
            new MethodHandlers<
              com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest,
              com.wavesplatform.api.grpc.TransactionsApiOuterClass.InvokeScriptResultResponse>(
                service, METHODID_GET_STATE_CHANGES)))
        .addMethod(
          getGetStatusesMethod(),
          io.grpc.stub.ServerCalls.asyncServerStreamingCall(
            new MethodHandlers<
              com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsByIdRequest,
              com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionStatus>(
                service, METHODID_GET_STATUSES)))
        .addMethod(
          getGetUnconfirmedMethod(),
          io.grpc.stub.ServerCalls.asyncServerStreamingCall(
            new MethodHandlers<
              com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionsRequest,
              com.wavesplatform.api.grpc.TransactionsApiOuterClass.TransactionResponse>(
                service, METHODID_GET_UNCONFIRMED)))
        .addMethod(
          getSignMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.wavesplatform.api.grpc.TransactionsApiOuterClass.SignRequest,
              com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction>(
                service, METHODID_SIGN)))
        .addMethod(
          getBroadcastMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction,
              com.wavesplatform.protobuf.transaction.TransactionOuterClass.SignedTransaction>(
                service, METHODID_BROADCAST)))
        .build();
  }

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

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

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

  private static final class TransactionsApiFileDescriptorSupplier
      extends TransactionsApiBaseDescriptorSupplier {
    TransactionsApiFileDescriptorSupplier() {}
  }

  private static final class TransactionsApiMethodDescriptorSupplier
      extends TransactionsApiBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    TransactionsApiMethodDescriptorSupplier(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 (TransactionsApiGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new TransactionsApiFileDescriptorSupplier())
              .addMethod(getGetTransactionsMethod())
              .addMethod(getGetStateChangesMethod())
              .addMethod(getGetStatusesMethod())
              .addMethod(getGetUnconfirmedMethod())
              .addMethod(getSignMethod())
              .addMethod(getBroadcastMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy