proto.tibc.core.client.v1.QueryGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of irita-sdk Show documentation
Show all versions of irita-sdk Show documentation
Irita open alliance chain SDK (java)
package proto.tibc.core.client.v1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
* Query provides defines the gRPC querier service
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.35.0)",
comments = "Source: tibc/core/client/v1/query.proto")
public final class QueryGrpc {
private QueryGrpc() {}
public static final String SERVICE_NAME = "tibc.core.client.v1.Query";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getClientStateMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ClientState",
requestType = QueryOuterClass.QueryClientStateRequest.class,
responseType = QueryOuterClass.QueryClientStateResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getClientStateMethod() {
io.grpc.MethodDescriptor getClientStateMethod;
if ((getClientStateMethod = QueryGrpc.getClientStateMethod) == null) {
synchronized (QueryGrpc.class) {
if ((getClientStateMethod = QueryGrpc.getClientStateMethod) == null) {
QueryGrpc.getClientStateMethod = getClientStateMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ClientState"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
QueryOuterClass.QueryClientStateRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
QueryOuterClass.QueryClientStateResponse.getDefaultInstance()))
.setSchemaDescriptor(new QueryMethodDescriptorSupplier("ClientState"))
.build();
}
}
}
return getClientStateMethod;
}
private static volatile io.grpc.MethodDescriptor getClientStatesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ClientStates",
requestType = QueryOuterClass.QueryClientStatesRequest.class,
responseType = QueryOuterClass.QueryClientStatesResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getClientStatesMethod() {
io.grpc.MethodDescriptor getClientStatesMethod;
if ((getClientStatesMethod = QueryGrpc.getClientStatesMethod) == null) {
synchronized (QueryGrpc.class) {
if ((getClientStatesMethod = QueryGrpc.getClientStatesMethod) == null) {
QueryGrpc.getClientStatesMethod = getClientStatesMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ClientStates"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
QueryOuterClass.QueryClientStatesRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
QueryOuterClass.QueryClientStatesResponse.getDefaultInstance()))
.setSchemaDescriptor(new QueryMethodDescriptorSupplier("ClientStates"))
.build();
}
}
}
return getClientStatesMethod;
}
private static volatile io.grpc.MethodDescriptor getConsensusStateMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ConsensusState",
requestType = QueryOuterClass.QueryConsensusStateRequest.class,
responseType = QueryOuterClass.QueryConsensusStateResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getConsensusStateMethod() {
io.grpc.MethodDescriptor getConsensusStateMethod;
if ((getConsensusStateMethod = QueryGrpc.getConsensusStateMethod) == null) {
synchronized (QueryGrpc.class) {
if ((getConsensusStateMethod = QueryGrpc.getConsensusStateMethod) == null) {
QueryGrpc.getConsensusStateMethod = getConsensusStateMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ConsensusState"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
QueryOuterClass.QueryConsensusStateRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
QueryOuterClass.QueryConsensusStateResponse.getDefaultInstance()))
.setSchemaDescriptor(new QueryMethodDescriptorSupplier("ConsensusState"))
.build();
}
}
}
return getConsensusStateMethod;
}
private static volatile io.grpc.MethodDescriptor getConsensusStatesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ConsensusStates",
requestType = QueryOuterClass.QueryConsensusStatesRequest.class,
responseType = QueryOuterClass.QueryConsensusStatesResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getConsensusStatesMethod() {
io.grpc.MethodDescriptor getConsensusStatesMethod;
if ((getConsensusStatesMethod = QueryGrpc.getConsensusStatesMethod) == null) {
synchronized (QueryGrpc.class) {
if ((getConsensusStatesMethod = QueryGrpc.getConsensusStatesMethod) == null) {
QueryGrpc.getConsensusStatesMethod = getConsensusStatesMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ConsensusStates"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
QueryOuterClass.QueryConsensusStatesRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
QueryOuterClass.QueryConsensusStatesResponse.getDefaultInstance()))
.setSchemaDescriptor(new QueryMethodDescriptorSupplier("ConsensusStates"))
.build();
}
}
}
return getConsensusStatesMethod;
}
private static volatile io.grpc.MethodDescriptor getRelayersMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Relayers",
requestType = QueryOuterClass.QueryRelayersRequest.class,
responseType = QueryOuterClass.QueryRelayersResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getRelayersMethod() {
io.grpc.MethodDescriptor getRelayersMethod;
if ((getRelayersMethod = QueryGrpc.getRelayersMethod) == null) {
synchronized (QueryGrpc.class) {
if ((getRelayersMethod = QueryGrpc.getRelayersMethod) == null) {
QueryGrpc.getRelayersMethod = getRelayersMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Relayers"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
QueryOuterClass.QueryRelayersRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
QueryOuterClass.QueryRelayersResponse.getDefaultInstance()))
.setSchemaDescriptor(new QueryMethodDescriptorSupplier("Relayers"))
.build();
}
}
}
return getRelayersMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static QueryStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@Override
public QueryStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new QueryStub(channel, callOptions);
}
};
return QueryStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static QueryBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@Override
public QueryBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new QueryBlockingStub(channel, callOptions);
}
};
return QueryBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static QueryFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@Override
public QueryFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new QueryFutureStub(channel, callOptions);
}
};
return QueryFutureStub.newStub(factory, channel);
}
/**
*
* Query provides defines the gRPC querier service
*
*/
public static abstract class QueryImplBase implements io.grpc.BindableService {
/**
*
* ClientState queries an TIBC light client.
*
*/
public void clientState(QueryOuterClass.QueryClientStateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getClientStateMethod(), responseObserver);
}
/**
*
* ClientStates queries all the TIBC light clients of a chain.
*
*/
public void clientStates(QueryOuterClass.QueryClientStatesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getClientStatesMethod(), responseObserver);
}
/**
*
* ConsensusState queries a consensus state associated with a client state at
* a given height.
*
*/
public void consensusState(QueryOuterClass.QueryConsensusStateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getConsensusStateMethod(), responseObserver);
}
/**
*
* ConsensusStates queries all the consensus state associated with a given
* client.
*
*/
public void consensusStates(QueryOuterClass.QueryConsensusStatesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getConsensusStatesMethod(), responseObserver);
}
/**
*
* Relayers queries all the relayers associated with a given
* client.
*
*/
public void relayers(QueryOuterClass.QueryRelayersRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRelayersMethod(), responseObserver);
}
@Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getClientStateMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
QueryOuterClass.QueryClientStateRequest,
QueryOuterClass.QueryClientStateResponse>(
this, METHODID_CLIENT_STATE)))
.addMethod(
getClientStatesMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
QueryOuterClass.QueryClientStatesRequest,
QueryOuterClass.QueryClientStatesResponse>(
this, METHODID_CLIENT_STATES)))
.addMethod(
getConsensusStateMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
QueryOuterClass.QueryConsensusStateRequest,
QueryOuterClass.QueryConsensusStateResponse>(
this, METHODID_CONSENSUS_STATE)))
.addMethod(
getConsensusStatesMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
QueryOuterClass.QueryConsensusStatesRequest,
QueryOuterClass.QueryConsensusStatesResponse>(
this, METHODID_CONSENSUS_STATES)))
.addMethod(
getRelayersMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
QueryOuterClass.QueryRelayersRequest,
QueryOuterClass.QueryRelayersResponse>(
this, METHODID_RELAYERS)))
.build();
}
}
/**
*
* Query provides defines the gRPC querier service
*
*/
public static final class QueryStub extends io.grpc.stub.AbstractAsyncStub {
private QueryStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@Override
protected QueryStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new QueryStub(channel, callOptions);
}
/**
*
* ClientState queries an TIBC light client.
*
*/
public void clientState(QueryOuterClass.QueryClientStateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getClientStateMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* ClientStates queries all the TIBC light clients of a chain.
*
*/
public void clientStates(QueryOuterClass.QueryClientStatesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getClientStatesMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* ConsensusState queries a consensus state associated with a client state at
* a given height.
*
*/
public void consensusState(QueryOuterClass.QueryConsensusStateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getConsensusStateMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* ConsensusStates queries all the consensus state associated with a given
* client.
*
*/
public void consensusStates(QueryOuterClass.QueryConsensusStatesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getConsensusStatesMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Relayers queries all the relayers associated with a given
* client.
*
*/
public void relayers(QueryOuterClass.QueryRelayersRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getRelayersMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*
* Query provides defines the gRPC querier service
*
*/
public static final class QueryBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private QueryBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@Override
protected QueryBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new QueryBlockingStub(channel, callOptions);
}
/**
*
* ClientState queries an TIBC light client.
*
*/
public QueryOuterClass.QueryClientStateResponse clientState(QueryOuterClass.QueryClientStateRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getClientStateMethod(), getCallOptions(), request);
}
/**
*
* ClientStates queries all the TIBC light clients of a chain.
*
*/
public QueryOuterClass.QueryClientStatesResponse clientStates(QueryOuterClass.QueryClientStatesRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getClientStatesMethod(), getCallOptions(), request);
}
/**
*
* ConsensusState queries a consensus state associated with a client state at
* a given height.
*
*/
public QueryOuterClass.QueryConsensusStateResponse consensusState(QueryOuterClass.QueryConsensusStateRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getConsensusStateMethod(), getCallOptions(), request);
}
/**
*
* ConsensusStates queries all the consensus state associated with a given
* client.
*
*/
public QueryOuterClass.QueryConsensusStatesResponse consensusStates(QueryOuterClass.QueryConsensusStatesRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getConsensusStatesMethod(), getCallOptions(), request);
}
/**
*
* Relayers queries all the relayers associated with a given
* client.
*
*/
public QueryOuterClass.QueryRelayersResponse relayers(QueryOuterClass.QueryRelayersRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getRelayersMethod(), getCallOptions(), request);
}
}
/**
*
* Query provides defines the gRPC querier service
*
*/
public static final class QueryFutureStub extends io.grpc.stub.AbstractFutureStub {
private QueryFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@Override
protected QueryFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new QueryFutureStub(channel, callOptions);
}
/**
*
* ClientState queries an TIBC light client.
*
*/
public com.google.common.util.concurrent.ListenableFuture clientState(
QueryOuterClass.QueryClientStateRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getClientStateMethod(), getCallOptions()), request);
}
/**
*
* ClientStates queries all the TIBC light clients of a chain.
*
*/
public com.google.common.util.concurrent.ListenableFuture clientStates(
QueryOuterClass.QueryClientStatesRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getClientStatesMethod(), getCallOptions()), request);
}
/**
*
* ConsensusState queries a consensus state associated with a client state at
* a given height.
*
*/
public com.google.common.util.concurrent.ListenableFuture consensusState(
QueryOuterClass.QueryConsensusStateRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getConsensusStateMethod(), getCallOptions()), request);
}
/**
*
* ConsensusStates queries all the consensus state associated with a given
* client.
*
*/
public com.google.common.util.concurrent.ListenableFuture consensusStates(
QueryOuterClass.QueryConsensusStatesRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getConsensusStatesMethod(), getCallOptions()), request);
}
/**
*
* Relayers queries all the relayers associated with a given
* client.
*
*/
public com.google.common.util.concurrent.ListenableFuture relayers(
QueryOuterClass.QueryRelayersRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getRelayersMethod(), getCallOptions()), request);
}
}
private static final int METHODID_CLIENT_STATE = 0;
private static final int METHODID_CLIENT_STATES = 1;
private static final int METHODID_CONSENSUS_STATE = 2;
private static final int METHODID_CONSENSUS_STATES = 3;
private static final int METHODID_RELAYERS = 4;
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 QueryImplBase serviceImpl;
private final int methodId;
MethodHandlers(QueryImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@Override
@SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_CLIENT_STATE:
serviceImpl.clientState((QueryOuterClass.QueryClientStateRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_CLIENT_STATES:
serviceImpl.clientStates((QueryOuterClass.QueryClientStatesRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_CONSENSUS_STATE:
serviceImpl.consensusState((QueryOuterClass.QueryConsensusStateRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_CONSENSUS_STATES:
serviceImpl.consensusStates((QueryOuterClass.QueryConsensusStatesRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_RELAYERS:
serviceImpl.relayers((QueryOuterClass.QueryRelayersRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@Override
@SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
private static abstract class QueryBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
QueryBaseDescriptorSupplier() {}
@Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return QueryOuterClass.getDescriptor();
}
@Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Query");
}
}
private static final class QueryFileDescriptorSupplier
extends QueryBaseDescriptorSupplier {
QueryFileDescriptorSupplier() {}
}
private static final class QueryMethodDescriptorSupplier
extends QueryBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
QueryMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
}
@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 (QueryGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new QueryFileDescriptorSupplier())
.addMethod(getClientStateMethod())
.addMethod(getClientStatesMethod())
.addMethod(getConsensusStateMethod())
.addMethod(getConsensusStatesMethod())
.addMethod(getRelayersMethod())
.build();
}
}
}
return result;
}
}