656 lines
30 KiB
Java
656 lines
30 KiB
Java
package bdchain.api.grpc;
|
|
|
|
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.14.0)",
|
|
comments = "Source: bdchain/api/ac_chain.proto")
|
|
public final class AccountingChainGrpc {
|
|
|
|
private AccountingChainGrpc() {}
|
|
|
|
public static final String SERVICE_NAME = "bdchain.api.AccountingChain";
|
|
|
|
// Static method descriptors that strictly reflect the proto.
|
|
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.BlockNumberRequest,
|
|
bdchain.api.grpc.BlockNumberResponse> getBlockNumberMethod;
|
|
|
|
@io.grpc.stub.annotations.RpcMethod(
|
|
fullMethodName = SERVICE_NAME + '/' + "BlockNumber",
|
|
requestType = bdchain.api.grpc.BlockNumberRequest.class,
|
|
responseType = bdchain.api.grpc.BlockNumberResponse.class,
|
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
|
public static io.grpc.MethodDescriptor<bdchain.api.grpc.BlockNumberRequest,
|
|
bdchain.api.grpc.BlockNumberResponse> getBlockNumberMethod() {
|
|
io.grpc.MethodDescriptor<bdchain.api.grpc.BlockNumberRequest, bdchain.api.grpc.BlockNumberResponse> getBlockNumberMethod;
|
|
if ((getBlockNumberMethod = AccountingChainGrpc.getBlockNumberMethod) == null) {
|
|
synchronized (AccountingChainGrpc.class) {
|
|
if ((getBlockNumberMethod = AccountingChainGrpc.getBlockNumberMethod) == null) {
|
|
AccountingChainGrpc.getBlockNumberMethod = getBlockNumberMethod =
|
|
io.grpc.MethodDescriptor.<bdchain.api.grpc.BlockNumberRequest, bdchain.api.grpc.BlockNumberResponse>newBuilder()
|
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
|
.setFullMethodName(generateFullMethodName(
|
|
"bdchain.api.AccountingChain", "BlockNumber"))
|
|
.setSampledToLocalTracing(true)
|
|
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
|
bdchain.api.grpc.BlockNumberRequest.getDefaultInstance()))
|
|
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
|
bdchain.api.grpc.BlockNumberResponse.getDefaultInstance()))
|
|
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("BlockNumber"))
|
|
.build();
|
|
}
|
|
}
|
|
}
|
|
return getBlockNumberMethod;
|
|
}
|
|
|
|
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.GetBlockByNumberRequest,
|
|
bdchain.api.grpc.Block> getGetBlockByNumberMethod;
|
|
|
|
@io.grpc.stub.annotations.RpcMethod(
|
|
fullMethodName = SERVICE_NAME + '/' + "GetBlockByNumber",
|
|
requestType = bdchain.api.grpc.GetBlockByNumberRequest.class,
|
|
responseType = bdchain.api.grpc.Block.class,
|
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
|
public static io.grpc.MethodDescriptor<bdchain.api.grpc.GetBlockByNumberRequest,
|
|
bdchain.api.grpc.Block> getGetBlockByNumberMethod() {
|
|
io.grpc.MethodDescriptor<bdchain.api.grpc.GetBlockByNumberRequest, bdchain.api.grpc.Block> getGetBlockByNumberMethod;
|
|
if ((getGetBlockByNumberMethod = AccountingChainGrpc.getGetBlockByNumberMethod) == null) {
|
|
synchronized (AccountingChainGrpc.class) {
|
|
if ((getGetBlockByNumberMethod = AccountingChainGrpc.getGetBlockByNumberMethod) == null) {
|
|
AccountingChainGrpc.getGetBlockByNumberMethod = getGetBlockByNumberMethod =
|
|
io.grpc.MethodDescriptor.<bdchain.api.grpc.GetBlockByNumberRequest, bdchain.api.grpc.Block>newBuilder()
|
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
|
.setFullMethodName(generateFullMethodName(
|
|
"bdchain.api.AccountingChain", "GetBlockByNumber"))
|
|
.setSampledToLocalTracing(true)
|
|
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
|
bdchain.api.grpc.GetBlockByNumberRequest.getDefaultInstance()))
|
|
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
|
bdchain.api.grpc.Block.getDefaultInstance()))
|
|
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetBlockByNumber"))
|
|
.build();
|
|
}
|
|
}
|
|
}
|
|
return getGetBlockByNumberMethod;
|
|
}
|
|
|
|
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.GetBlockByHashRequest,
|
|
bdchain.api.grpc.Block> getGetBlockByHashMethod;
|
|
|
|
@io.grpc.stub.annotations.RpcMethod(
|
|
fullMethodName = SERVICE_NAME + '/' + "GetBlockByHash",
|
|
requestType = bdchain.api.grpc.GetBlockByHashRequest.class,
|
|
responseType = bdchain.api.grpc.Block.class,
|
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
|
public static io.grpc.MethodDescriptor<bdchain.api.grpc.GetBlockByHashRequest,
|
|
bdchain.api.grpc.Block> getGetBlockByHashMethod() {
|
|
io.grpc.MethodDescriptor<bdchain.api.grpc.GetBlockByHashRequest, bdchain.api.grpc.Block> getGetBlockByHashMethod;
|
|
if ((getGetBlockByHashMethod = AccountingChainGrpc.getGetBlockByHashMethod) == null) {
|
|
synchronized (AccountingChainGrpc.class) {
|
|
if ((getGetBlockByHashMethod = AccountingChainGrpc.getGetBlockByHashMethod) == null) {
|
|
AccountingChainGrpc.getGetBlockByHashMethod = getGetBlockByHashMethod =
|
|
io.grpc.MethodDescriptor.<bdchain.api.grpc.GetBlockByHashRequest, bdchain.api.grpc.Block>newBuilder()
|
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
|
.setFullMethodName(generateFullMethodName(
|
|
"bdchain.api.AccountingChain", "GetBlockByHash"))
|
|
.setSampledToLocalTracing(true)
|
|
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
|
bdchain.api.grpc.GetBlockByHashRequest.getDefaultInstance()))
|
|
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
|
bdchain.api.grpc.Block.getDefaultInstance()))
|
|
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetBlockByHash"))
|
|
.build();
|
|
}
|
|
}
|
|
}
|
|
return getGetBlockByHashMethod;
|
|
}
|
|
|
|
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByHashRequest,
|
|
bdchain.api.grpc.Transaction> getGetTransactionByHashMethod;
|
|
|
|
@io.grpc.stub.annotations.RpcMethod(
|
|
fullMethodName = SERVICE_NAME + '/' + "GetTransactionByHash",
|
|
requestType = bdchain.api.grpc.GetTransactionByHashRequest.class,
|
|
responseType = bdchain.api.grpc.Transaction.class,
|
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
|
public static io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByHashRequest,
|
|
bdchain.api.grpc.Transaction> getGetTransactionByHashMethod() {
|
|
io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByHashRequest, bdchain.api.grpc.Transaction> getGetTransactionByHashMethod;
|
|
if ((getGetTransactionByHashMethod = AccountingChainGrpc.getGetTransactionByHashMethod) == null) {
|
|
synchronized (AccountingChainGrpc.class) {
|
|
if ((getGetTransactionByHashMethod = AccountingChainGrpc.getGetTransactionByHashMethod) == null) {
|
|
AccountingChainGrpc.getGetTransactionByHashMethod = getGetTransactionByHashMethod =
|
|
io.grpc.MethodDescriptor.<bdchain.api.grpc.GetTransactionByHashRequest, bdchain.api.grpc.Transaction>newBuilder()
|
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
|
.setFullMethodName(generateFullMethodName(
|
|
"bdchain.api.AccountingChain", "GetTransactionByHash"))
|
|
.setSampledToLocalTracing(true)
|
|
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
|
bdchain.api.grpc.GetTransactionByHashRequest.getDefaultInstance()))
|
|
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
|
bdchain.api.grpc.Transaction.getDefaultInstance()))
|
|
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetTransactionByHash"))
|
|
.build();
|
|
}
|
|
}
|
|
}
|
|
return getGetTransactionByHashMethod;
|
|
}
|
|
|
|
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest,
|
|
bdchain.api.grpc.Transaction> getGetTransactionByBlockNumberAndIndexMethod;
|
|
|
|
@io.grpc.stub.annotations.RpcMethod(
|
|
fullMethodName = SERVICE_NAME + '/' + "GetTransactionByBlockNumberAndIndex",
|
|
requestType = bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.class,
|
|
responseType = bdchain.api.grpc.Transaction.class,
|
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
|
public static io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest,
|
|
bdchain.api.grpc.Transaction> getGetTransactionByBlockNumberAndIndexMethod() {
|
|
io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest, bdchain.api.grpc.Transaction> getGetTransactionByBlockNumberAndIndexMethod;
|
|
if ((getGetTransactionByBlockNumberAndIndexMethod = AccountingChainGrpc.getGetTransactionByBlockNumberAndIndexMethod) == null) {
|
|
synchronized (AccountingChainGrpc.class) {
|
|
if ((getGetTransactionByBlockNumberAndIndexMethod = AccountingChainGrpc.getGetTransactionByBlockNumberAndIndexMethod) == null) {
|
|
AccountingChainGrpc.getGetTransactionByBlockNumberAndIndexMethod = getGetTransactionByBlockNumberAndIndexMethod =
|
|
io.grpc.MethodDescriptor.<bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest, bdchain.api.grpc.Transaction>newBuilder()
|
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
|
.setFullMethodName(generateFullMethodName(
|
|
"bdchain.api.AccountingChain", "GetTransactionByBlockNumberAndIndex"))
|
|
.setSampledToLocalTracing(true)
|
|
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
|
bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.getDefaultInstance()))
|
|
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
|
bdchain.api.grpc.Transaction.getDefaultInstance()))
|
|
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetTransactionByBlockNumberAndIndex"))
|
|
.build();
|
|
}
|
|
}
|
|
}
|
|
return getGetTransactionByBlockNumberAndIndexMethod;
|
|
}
|
|
|
|
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest,
|
|
bdchain.api.grpc.Transaction> getGetTransactionByBlockHashAndIndexMethod;
|
|
|
|
@io.grpc.stub.annotations.RpcMethod(
|
|
fullMethodName = SERVICE_NAME + '/' + "GetTransactionByBlockHashAndIndex",
|
|
requestType = bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.class,
|
|
responseType = bdchain.api.grpc.Transaction.class,
|
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
|
public static io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest,
|
|
bdchain.api.grpc.Transaction> getGetTransactionByBlockHashAndIndexMethod() {
|
|
io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest, bdchain.api.grpc.Transaction> getGetTransactionByBlockHashAndIndexMethod;
|
|
if ((getGetTransactionByBlockHashAndIndexMethod = AccountingChainGrpc.getGetTransactionByBlockHashAndIndexMethod) == null) {
|
|
synchronized (AccountingChainGrpc.class) {
|
|
if ((getGetTransactionByBlockHashAndIndexMethod = AccountingChainGrpc.getGetTransactionByBlockHashAndIndexMethod) == null) {
|
|
AccountingChainGrpc.getGetTransactionByBlockHashAndIndexMethod = getGetTransactionByBlockHashAndIndexMethod =
|
|
io.grpc.MethodDescriptor.<bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest, bdchain.api.grpc.Transaction>newBuilder()
|
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
|
.setFullMethodName(generateFullMethodName(
|
|
"bdchain.api.AccountingChain", "GetTransactionByBlockHashAndIndex"))
|
|
.setSampledToLocalTracing(true)
|
|
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
|
bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.getDefaultInstance()))
|
|
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
|
bdchain.api.grpc.Transaction.getDefaultInstance()))
|
|
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetTransactionByBlockHashAndIndex"))
|
|
.build();
|
|
}
|
|
}
|
|
}
|
|
return getGetTransactionByBlockHashAndIndexMethod;
|
|
}
|
|
|
|
/**
|
|
* Creates a new async stub that supports all call types for the service
|
|
*/
|
|
public static AccountingChainStub newStub(io.grpc.Channel channel) {
|
|
return new AccountingChainStub(channel);
|
|
}
|
|
|
|
/**
|
|
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
|
|
*/
|
|
public static AccountingChainBlockingStub newBlockingStub(
|
|
io.grpc.Channel channel) {
|
|
return new AccountingChainBlockingStub(channel);
|
|
}
|
|
|
|
/**
|
|
* Creates a new ListenableFuture-style stub that supports unary calls on the service
|
|
*/
|
|
public static AccountingChainFutureStub newFutureStub(
|
|
io.grpc.Channel channel) {
|
|
return new AccountingChainFutureStub(channel);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public static abstract class AccountingChainImplBase implements io.grpc.BindableService {
|
|
|
|
/**
|
|
*/
|
|
public void blockNumber(bdchain.api.grpc.BlockNumberRequest request,
|
|
io.grpc.stub.StreamObserver<bdchain.api.grpc.BlockNumberResponse> responseObserver) {
|
|
asyncUnimplementedUnaryCall(getBlockNumberMethod(), responseObserver);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public void getBlockByNumber(bdchain.api.grpc.GetBlockByNumberRequest request,
|
|
io.grpc.stub.StreamObserver<bdchain.api.grpc.Block> responseObserver) {
|
|
asyncUnimplementedUnaryCall(getGetBlockByNumberMethod(), responseObserver);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public void getBlockByHash(bdchain.api.grpc.GetBlockByHashRequest request,
|
|
io.grpc.stub.StreamObserver<bdchain.api.grpc.Block> responseObserver) {
|
|
asyncUnimplementedUnaryCall(getGetBlockByHashMethod(), responseObserver);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public void getTransactionByHash(bdchain.api.grpc.GetTransactionByHashRequest request,
|
|
io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction> responseObserver) {
|
|
asyncUnimplementedUnaryCall(getGetTransactionByHashMethod(), responseObserver);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public void getTransactionByBlockNumberAndIndex(bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest request,
|
|
io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction> responseObserver) {
|
|
asyncUnimplementedUnaryCall(getGetTransactionByBlockNumberAndIndexMethod(), responseObserver);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public void getTransactionByBlockHashAndIndex(bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest request,
|
|
io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction> responseObserver) {
|
|
asyncUnimplementedUnaryCall(getGetTransactionByBlockHashAndIndexMethod(), responseObserver);
|
|
}
|
|
|
|
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
|
|
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
|
.addMethod(
|
|
getBlockNumberMethod(),
|
|
asyncUnaryCall(
|
|
new MethodHandlers<
|
|
bdchain.api.grpc.BlockNumberRequest,
|
|
bdchain.api.grpc.BlockNumberResponse>(
|
|
this, METHODID_BLOCK_NUMBER)))
|
|
.addMethod(
|
|
getGetBlockByNumberMethod(),
|
|
asyncUnaryCall(
|
|
new MethodHandlers<
|
|
bdchain.api.grpc.GetBlockByNumberRequest,
|
|
bdchain.api.grpc.Block>(
|
|
this, METHODID_GET_BLOCK_BY_NUMBER)))
|
|
.addMethod(
|
|
getGetBlockByHashMethod(),
|
|
asyncUnaryCall(
|
|
new MethodHandlers<
|
|
bdchain.api.grpc.GetBlockByHashRequest,
|
|
bdchain.api.grpc.Block>(
|
|
this, METHODID_GET_BLOCK_BY_HASH)))
|
|
.addMethod(
|
|
getGetTransactionByHashMethod(),
|
|
asyncUnaryCall(
|
|
new MethodHandlers<
|
|
bdchain.api.grpc.GetTransactionByHashRequest,
|
|
bdchain.api.grpc.Transaction>(
|
|
this, METHODID_GET_TRANSACTION_BY_HASH)))
|
|
.addMethod(
|
|
getGetTransactionByBlockNumberAndIndexMethod(),
|
|
asyncUnaryCall(
|
|
new MethodHandlers<
|
|
bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest,
|
|
bdchain.api.grpc.Transaction>(
|
|
this, METHODID_GET_TRANSACTION_BY_BLOCK_NUMBER_AND_INDEX)))
|
|
.addMethod(
|
|
getGetTransactionByBlockHashAndIndexMethod(),
|
|
asyncUnaryCall(
|
|
new MethodHandlers<
|
|
bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest,
|
|
bdchain.api.grpc.Transaction>(
|
|
this, METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX)))
|
|
.build();
|
|
}
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public static final class AccountingChainStub extends io.grpc.stub.AbstractStub<AccountingChainStub> {
|
|
private AccountingChainStub(io.grpc.Channel channel) {
|
|
super(channel);
|
|
}
|
|
|
|
private AccountingChainStub(io.grpc.Channel channel,
|
|
io.grpc.CallOptions callOptions) {
|
|
super(channel, callOptions);
|
|
}
|
|
|
|
@java.lang.Override
|
|
protected AccountingChainStub build(io.grpc.Channel channel,
|
|
io.grpc.CallOptions callOptions) {
|
|
return new AccountingChainStub(channel, callOptions);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public void blockNumber(bdchain.api.grpc.BlockNumberRequest request,
|
|
io.grpc.stub.StreamObserver<bdchain.api.grpc.BlockNumberResponse> responseObserver) {
|
|
asyncUnaryCall(
|
|
getChannel().newCall(getBlockNumberMethod(), getCallOptions()), request, responseObserver);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public void getBlockByNumber(bdchain.api.grpc.GetBlockByNumberRequest request,
|
|
io.grpc.stub.StreamObserver<bdchain.api.grpc.Block> responseObserver) {
|
|
asyncUnaryCall(
|
|
getChannel().newCall(getGetBlockByNumberMethod(), getCallOptions()), request, responseObserver);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public void getBlockByHash(bdchain.api.grpc.GetBlockByHashRequest request,
|
|
io.grpc.stub.StreamObserver<bdchain.api.grpc.Block> responseObserver) {
|
|
asyncUnaryCall(
|
|
getChannel().newCall(getGetBlockByHashMethod(), getCallOptions()), request, responseObserver);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public void getTransactionByHash(bdchain.api.grpc.GetTransactionByHashRequest request,
|
|
io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction> responseObserver) {
|
|
asyncUnaryCall(
|
|
getChannel().newCall(getGetTransactionByHashMethod(), getCallOptions()), request, responseObserver);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public void getTransactionByBlockNumberAndIndex(bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest request,
|
|
io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction> responseObserver) {
|
|
asyncUnaryCall(
|
|
getChannel().newCall(getGetTransactionByBlockNumberAndIndexMethod(), getCallOptions()), request, responseObserver);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public void getTransactionByBlockHashAndIndex(bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest request,
|
|
io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction> responseObserver) {
|
|
asyncUnaryCall(
|
|
getChannel().newCall(getGetTransactionByBlockHashAndIndexMethod(), getCallOptions()), request, responseObserver);
|
|
}
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public static final class AccountingChainBlockingStub extends io.grpc.stub.AbstractStub<AccountingChainBlockingStub> {
|
|
private AccountingChainBlockingStub(io.grpc.Channel channel) {
|
|
super(channel);
|
|
}
|
|
|
|
private AccountingChainBlockingStub(io.grpc.Channel channel,
|
|
io.grpc.CallOptions callOptions) {
|
|
super(channel, callOptions);
|
|
}
|
|
|
|
@java.lang.Override
|
|
protected AccountingChainBlockingStub build(io.grpc.Channel channel,
|
|
io.grpc.CallOptions callOptions) {
|
|
return new AccountingChainBlockingStub(channel, callOptions);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public bdchain.api.grpc.BlockNumberResponse blockNumber(bdchain.api.grpc.BlockNumberRequest request) {
|
|
return blockingUnaryCall(
|
|
getChannel(), getBlockNumberMethod(), getCallOptions(), request);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public bdchain.api.grpc.Block getBlockByNumber(bdchain.api.grpc.GetBlockByNumberRequest request) {
|
|
return blockingUnaryCall(
|
|
getChannel(), getGetBlockByNumberMethod(), getCallOptions(), request);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public bdchain.api.grpc.Block getBlockByHash(bdchain.api.grpc.GetBlockByHashRequest request) {
|
|
return blockingUnaryCall(
|
|
getChannel(), getGetBlockByHashMethod(), getCallOptions(), request);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public bdchain.api.grpc.Transaction getTransactionByHash(bdchain.api.grpc.GetTransactionByHashRequest request) {
|
|
return blockingUnaryCall(
|
|
getChannel(), getGetTransactionByHashMethod(), getCallOptions(), request);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public bdchain.api.grpc.Transaction getTransactionByBlockNumberAndIndex(bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest request) {
|
|
return blockingUnaryCall(
|
|
getChannel(), getGetTransactionByBlockNumberAndIndexMethod(), getCallOptions(), request);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public bdchain.api.grpc.Transaction getTransactionByBlockHashAndIndex(bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest request) {
|
|
return blockingUnaryCall(
|
|
getChannel(), getGetTransactionByBlockHashAndIndexMethod(), getCallOptions(), request);
|
|
}
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public static final class AccountingChainFutureStub extends io.grpc.stub.AbstractStub<AccountingChainFutureStub> {
|
|
private AccountingChainFutureStub(io.grpc.Channel channel) {
|
|
super(channel);
|
|
}
|
|
|
|
private AccountingChainFutureStub(io.grpc.Channel channel,
|
|
io.grpc.CallOptions callOptions) {
|
|
super(channel, callOptions);
|
|
}
|
|
|
|
@java.lang.Override
|
|
protected AccountingChainFutureStub build(io.grpc.Channel channel,
|
|
io.grpc.CallOptions callOptions) {
|
|
return new AccountingChainFutureStub(channel, callOptions);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.BlockNumberResponse> blockNumber(
|
|
bdchain.api.grpc.BlockNumberRequest request) {
|
|
return futureUnaryCall(
|
|
getChannel().newCall(getBlockNumberMethod(), getCallOptions()), request);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.Block> getBlockByNumber(
|
|
bdchain.api.grpc.GetBlockByNumberRequest request) {
|
|
return futureUnaryCall(
|
|
getChannel().newCall(getGetBlockByNumberMethod(), getCallOptions()), request);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.Block> getBlockByHash(
|
|
bdchain.api.grpc.GetBlockByHashRequest request) {
|
|
return futureUnaryCall(
|
|
getChannel().newCall(getGetBlockByHashMethod(), getCallOptions()), request);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.Transaction> getTransactionByHash(
|
|
bdchain.api.grpc.GetTransactionByHashRequest request) {
|
|
return futureUnaryCall(
|
|
getChannel().newCall(getGetTransactionByHashMethod(), getCallOptions()), request);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.Transaction> getTransactionByBlockNumberAndIndex(
|
|
bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest request) {
|
|
return futureUnaryCall(
|
|
getChannel().newCall(getGetTransactionByBlockNumberAndIndexMethod(), getCallOptions()), request);
|
|
}
|
|
|
|
/**
|
|
*/
|
|
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.Transaction> getTransactionByBlockHashAndIndex(
|
|
bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest request) {
|
|
return futureUnaryCall(
|
|
getChannel().newCall(getGetTransactionByBlockHashAndIndexMethod(), getCallOptions()), request);
|
|
}
|
|
}
|
|
|
|
private static final int METHODID_BLOCK_NUMBER = 0;
|
|
private static final int METHODID_GET_BLOCK_BY_NUMBER = 1;
|
|
private static final int METHODID_GET_BLOCK_BY_HASH = 2;
|
|
private static final int METHODID_GET_TRANSACTION_BY_HASH = 3;
|
|
private static final int METHODID_GET_TRANSACTION_BY_BLOCK_NUMBER_AND_INDEX = 4;
|
|
private static final int METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX = 5;
|
|
|
|
private static final class MethodHandlers<Req, Resp> implements
|
|
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
|
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
|
|
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
|
|
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
|
|
private final AccountingChainImplBase serviceImpl;
|
|
private final int methodId;
|
|
|
|
MethodHandlers(AccountingChainImplBase 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<Resp> responseObserver) {
|
|
switch (methodId) {
|
|
case METHODID_BLOCK_NUMBER:
|
|
serviceImpl.blockNumber((bdchain.api.grpc.BlockNumberRequest) request,
|
|
(io.grpc.stub.StreamObserver<bdchain.api.grpc.BlockNumberResponse>) responseObserver);
|
|
break;
|
|
case METHODID_GET_BLOCK_BY_NUMBER:
|
|
serviceImpl.getBlockByNumber((bdchain.api.grpc.GetBlockByNumberRequest) request,
|
|
(io.grpc.stub.StreamObserver<bdchain.api.grpc.Block>) responseObserver);
|
|
break;
|
|
case METHODID_GET_BLOCK_BY_HASH:
|
|
serviceImpl.getBlockByHash((bdchain.api.grpc.GetBlockByHashRequest) request,
|
|
(io.grpc.stub.StreamObserver<bdchain.api.grpc.Block>) responseObserver);
|
|
break;
|
|
case METHODID_GET_TRANSACTION_BY_HASH:
|
|
serviceImpl.getTransactionByHash((bdchain.api.grpc.GetTransactionByHashRequest) request,
|
|
(io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction>) responseObserver);
|
|
break;
|
|
case METHODID_GET_TRANSACTION_BY_BLOCK_NUMBER_AND_INDEX:
|
|
serviceImpl.getTransactionByBlockNumberAndIndex((bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest) request,
|
|
(io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction>) responseObserver);
|
|
break;
|
|
case METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX:
|
|
serviceImpl.getTransactionByBlockHashAndIndex((bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest) request,
|
|
(io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction>) responseObserver);
|
|
break;
|
|
default:
|
|
throw new AssertionError();
|
|
}
|
|
}
|
|
|
|
@java.lang.Override
|
|
@java.lang.SuppressWarnings("unchecked")
|
|
public io.grpc.stub.StreamObserver<Req> invoke(
|
|
io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
|
switch (methodId) {
|
|
default:
|
|
throw new AssertionError();
|
|
}
|
|
}
|
|
}
|
|
|
|
private static abstract class AccountingChainBaseDescriptorSupplier
|
|
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
|
|
AccountingChainBaseDescriptorSupplier() {}
|
|
|
|
@java.lang.Override
|
|
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
|
|
return bdchain.api.grpc.AccountingChainProto.getDescriptor();
|
|
}
|
|
|
|
@java.lang.Override
|
|
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
|
|
return getFileDescriptor().findServiceByName("AccountingChain");
|
|
}
|
|
}
|
|
|
|
private static final class AccountingChainFileDescriptorSupplier
|
|
extends AccountingChainBaseDescriptorSupplier {
|
|
AccountingChainFileDescriptorSupplier() {}
|
|
}
|
|
|
|
private static final class AccountingChainMethodDescriptorSupplier
|
|
extends AccountingChainBaseDescriptorSupplier
|
|
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
|
|
private final String methodName;
|
|
|
|
AccountingChainMethodDescriptorSupplier(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 (AccountingChainGrpc.class) {
|
|
result = serviceDescriptor;
|
|
if (result == null) {
|
|
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
|
|
.setSchemaDescriptor(new AccountingChainFileDescriptorSupplier())
|
|
.addMethod(getBlockNumberMethod())
|
|
.addMethod(getGetBlockByNumberMethod())
|
|
.addMethod(getGetBlockByHashMethod())
|
|
.addMethod(getGetTransactionByHashMethod())
|
|
.addMethod(getGetTransactionByBlockNumberAndIndexMethod())
|
|
.addMethod(getGetTransactionByBlockHashAndIndexMethod())
|
|
.build();
|
|
}
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
}
|