com.wavesplatform.api.grpc.AssetsApiGrpc 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;
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/node/grpc/assets_api.proto")
public final class AssetsApiGrpc {
private AssetsApiGrpc() {}
public static final String SERVICE_NAME = "waves.node.grpc.AssetsApi";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getGetInfoMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetInfo",
requestType = com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest.class,
responseType = com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetInfoResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetInfoMethod() {
io.grpc.MethodDescriptor getGetInfoMethod;
if ((getGetInfoMethod = AssetsApiGrpc.getGetInfoMethod) == null) {
synchronized (AssetsApiGrpc.class) {
if ((getGetInfoMethod = AssetsApiGrpc.getGetInfoMethod) == null) {
AssetsApiGrpc.getGetInfoMethod = getGetInfoMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInfo"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetInfoResponse.getDefaultInstance()))
.setSchemaDescriptor(new AssetsApiMethodDescriptorSupplier("GetInfo"))
.build();
}
}
}
return getGetInfoMethod;
}
private static volatile io.grpc.MethodDescriptor getGetNFTListMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetNFTList",
requestType = com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTRequest.class,
responseType = com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getGetNFTListMethod() {
io.grpc.MethodDescriptor getGetNFTListMethod;
if ((getGetNFTListMethod = AssetsApiGrpc.getGetNFTListMethod) == null) {
synchronized (AssetsApiGrpc.class) {
if ((getGetNFTListMethod = AssetsApiGrpc.getGetNFTListMethod) == null) {
AssetsApiGrpc.getGetNFTListMethod = getGetNFTListMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNFTList"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTResponse.getDefaultInstance()))
.setSchemaDescriptor(new AssetsApiMethodDescriptorSupplier("GetNFTList"))
.build();
}
}
}
return getGetNFTListMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static AssetsApiStub newStub(io.grpc.Channel channel) {
return new AssetsApiStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static AssetsApiBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new AssetsApiBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static AssetsApiFutureStub newFutureStub(
io.grpc.Channel channel) {
return new AssetsApiFutureStub(channel);
}
/**
*/
public static abstract class AssetsApiImplBase implements io.grpc.BindableService {
/**
*/
public void getInfo(com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGetInfoMethod(), responseObserver);
}
/**
*/
public void getNFTList(com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGetNFTListMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getGetInfoMethod(),
asyncUnaryCall(
new MethodHandlers<
com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest,
com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetInfoResponse>(
this, METHODID_GET_INFO)))
.addMethod(
getGetNFTListMethod(),
asyncServerStreamingCall(
new MethodHandlers<
com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTRequest,
com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTResponse>(
this, METHODID_GET_NFTLIST)))
.build();
}
}
/**
*/
public static final class AssetsApiStub extends io.grpc.stub.AbstractStub {
private AssetsApiStub(io.grpc.Channel channel) {
super(channel);
}
private AssetsApiStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AssetsApiStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new AssetsApiStub(channel, callOptions);
}
/**
*/
public void getInfo(com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetInfoMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getNFTList(com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncServerStreamingCall(
getChannel().newCall(getGetNFTListMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class AssetsApiBlockingStub extends io.grpc.stub.AbstractStub {
private AssetsApiBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private AssetsApiBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AssetsApiBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new AssetsApiBlockingStub(channel, callOptions);
}
/**
*/
public com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetInfoResponse getInfo(com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest request) {
return blockingUnaryCall(
getChannel(), getGetInfoMethod(), getCallOptions(), request);
}
/**
*/
public java.util.Iterator getNFTList(
com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTRequest request) {
return blockingServerStreamingCall(
getChannel(), getGetNFTListMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class AssetsApiFutureStub extends io.grpc.stub.AbstractStub {
private AssetsApiFutureStub(io.grpc.Channel channel) {
super(channel);
}
private AssetsApiFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AssetsApiFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new AssetsApiFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture getInfo(
com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetInfoMethod(), getCallOptions()), request);
}
}
private static final int METHODID_GET_INFO = 0;
private static final int METHODID_GET_NFTLIST = 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 AssetsApiImplBase serviceImpl;
private final int methodId;
MethodHandlers(AssetsApiImplBase 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_INFO:
serviceImpl.getInfo((com.wavesplatform.api.grpc.AssetsApiOuterClass.AssetRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_NFTLIST:
serviceImpl.getNFTList((com.wavesplatform.api.grpc.AssetsApiOuterClass.NFTRequest) 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 AssetsApiBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
AssetsApiBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.wavesplatform.api.grpc.AssetsApiOuterClass.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("AssetsApi");
}
}
private static final class AssetsApiFileDescriptorSupplier
extends AssetsApiBaseDescriptorSupplier {
AssetsApiFileDescriptorSupplier() {}
}
private static final class AssetsApiMethodDescriptorSupplier
extends AssetsApiBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
AssetsApiMethodDescriptorSupplier(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 (AssetsApiGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new AssetsApiFileDescriptorSupplier())
.addMethod(getGetInfoMethod())
.addMethod(getGetNFTListMethod())
.build();
}
}
}
return result;
}
}