
com.wavesplatform.api.grpc.BlocksApiGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protobuf-schemas Show documentation
Show all versions of protobuf-schemas Show documentation
Waves Node protobuf java classes
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/blocks_api.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class BlocksApiGrpc {
private BlocksApiGrpc() {}
public static final String SERVICE_NAME = "waves.node.grpc.BlocksApi";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getGetBlockMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetBlock",
requestType = com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRequest.class,
responseType = com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockWithHeight.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetBlockMethod() {
io.grpc.MethodDescriptor getGetBlockMethod;
if ((getGetBlockMethod = BlocksApiGrpc.getGetBlockMethod) == null) {
synchronized (BlocksApiGrpc.class) {
if ((getGetBlockMethod = BlocksApiGrpc.getGetBlockMethod) == null) {
BlocksApiGrpc.getGetBlockMethod = getGetBlockMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlock"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockWithHeight.getDefaultInstance()))
.setSchemaDescriptor(new BlocksApiMethodDescriptorSupplier("GetBlock"))
.build();
}
}
}
return getGetBlockMethod;
}
private static volatile io.grpc.MethodDescriptor getGetBlockRangeMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetBlockRange",
requestType = com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRangeRequest.class,
responseType = com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockWithHeight.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getGetBlockRangeMethod() {
io.grpc.MethodDescriptor getGetBlockRangeMethod;
if ((getGetBlockRangeMethod = BlocksApiGrpc.getGetBlockRangeMethod) == null) {
synchronized (BlocksApiGrpc.class) {
if ((getGetBlockRangeMethod = BlocksApiGrpc.getGetBlockRangeMethod) == null) {
BlocksApiGrpc.getGetBlockRangeMethod = getGetBlockRangeMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlockRange"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRangeRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockWithHeight.getDefaultInstance()))
.setSchemaDescriptor(new BlocksApiMethodDescriptorSupplier("GetBlockRange"))
.build();
}
}
}
return getGetBlockRangeMethod;
}
private static volatile io.grpc.MethodDescriptor getGetCurrentHeightMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetCurrentHeight",
requestType = com.google.protobuf.Empty.class,
responseType = com.google.protobuf.UInt32Value.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetCurrentHeightMethod() {
io.grpc.MethodDescriptor getGetCurrentHeightMethod;
if ((getGetCurrentHeightMethod = BlocksApiGrpc.getGetCurrentHeightMethod) == null) {
synchronized (BlocksApiGrpc.class) {
if ((getGetCurrentHeightMethod = BlocksApiGrpc.getGetCurrentHeightMethod) == null) {
BlocksApiGrpc.getGetCurrentHeightMethod = getGetCurrentHeightMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCurrentHeight"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.UInt32Value.getDefaultInstance()))
.setSchemaDescriptor(new BlocksApiMethodDescriptorSupplier("GetCurrentHeight"))
.build();
}
}
}
return getGetCurrentHeightMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static BlocksApiStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public BlocksApiStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new BlocksApiStub(channel, callOptions);
}
};
return BlocksApiStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static BlocksApiBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public BlocksApiBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new BlocksApiBlockingStub(channel, callOptions);
}
};
return BlocksApiBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static BlocksApiFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public BlocksApiFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new BlocksApiFutureStub(channel, callOptions);
}
};
return BlocksApiFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*/
default void getBlock(com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockMethod(), responseObserver);
}
/**
*/
default void getBlockRange(com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRangeRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockRangeMethod(), responseObserver);
}
/**
*/
default void getCurrentHeight(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetCurrentHeightMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service BlocksApi.
*/
public static abstract class BlocksApiImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return BlocksApiGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service BlocksApi.
*/
public static final class BlocksApiStub
extends io.grpc.stub.AbstractAsyncStub {
private BlocksApiStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected BlocksApiStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new BlocksApiStub(channel, callOptions);
}
/**
*/
public void getBlock(com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetBlockMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getBlockRange(com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRangeRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getGetBlockRangeMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getCurrentHeight(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetCurrentHeightMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service BlocksApi.
*/
public static final class BlocksApiBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private BlocksApiBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected BlocksApiBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new BlocksApiBlockingStub(channel, callOptions);
}
/**
*/
public com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockWithHeight getBlock(com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetBlockMethod(), getCallOptions(), request);
}
/**
*/
public java.util.Iterator getBlockRange(
com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRangeRequest request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getGetBlockRangeMethod(), getCallOptions(), request);
}
/**
*/
public com.google.protobuf.UInt32Value getCurrentHeight(com.google.protobuf.Empty request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetCurrentHeightMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service BlocksApi.
*/
public static final class BlocksApiFutureStub
extends io.grpc.stub.AbstractFutureStub {
private BlocksApiFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected BlocksApiFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new BlocksApiFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture getBlock(
com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetBlockMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture getCurrentHeight(
com.google.protobuf.Empty request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetCurrentHeightMethod(), getCallOptions()), request);
}
}
private static final int METHODID_GET_BLOCK = 0;
private static final int METHODID_GET_BLOCK_RANGE = 1;
private static final int METHODID_GET_CURRENT_HEIGHT = 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 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_BLOCK:
serviceImpl.getBlock((com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_BLOCK_RANGE:
serviceImpl.getBlockRange((com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRangeRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_CURRENT_HEIGHT:
serviceImpl.getCurrentHeight((com.google.protobuf.Empty) 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(
getGetBlockMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRequest,
com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockWithHeight>(
service, METHODID_GET_BLOCK)))
.addMethod(
getGetBlockRangeMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockRangeRequest,
com.wavesplatform.api.grpc.BlocksApiOuterClass.BlockWithHeight>(
service, METHODID_GET_BLOCK_RANGE)))
.addMethod(
getGetCurrentHeightMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.protobuf.Empty,
com.google.protobuf.UInt32Value>(
service, METHODID_GET_CURRENT_HEIGHT)))
.build();
}
private static abstract class BlocksApiBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
BlocksApiBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.wavesplatform.api.grpc.BlocksApiOuterClass.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("BlocksApi");
}
}
private static final class BlocksApiFileDescriptorSupplier
extends BlocksApiBaseDescriptorSupplier {
BlocksApiFileDescriptorSupplier() {}
}
private static final class BlocksApiMethodDescriptorSupplier
extends BlocksApiBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
BlocksApiMethodDescriptorSupplier(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 (BlocksApiGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new BlocksApiFileDescriptorSupplier())
.addMethod(getGetBlockMethod())
.addMethod(getGetBlockRangeMethod())
.addMethod(getGetCurrentHeightMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy