com.hedera.hashgraph.sdk.proto.NetworkServiceGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-full Show documentation
Show all versions of sdk-full Show documentation
Hedera™ Hashgraph SDK for Java
The newest version!
package com.hedera.hashgraph.sdk.proto;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
**
* The requests and responses for different network services.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.50.2)",
comments = "Source: network_service.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class NetworkServiceGrpc {
private NetworkServiceGrpc() {}
public static final String SERVICE_NAME = "proto.NetworkService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getGetVersionInfoMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "getVersionInfo",
requestType = com.hedera.hashgraph.sdk.proto.Query.class,
responseType = com.hedera.hashgraph.sdk.proto.Response.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetVersionInfoMethod() {
io.grpc.MethodDescriptor getGetVersionInfoMethod;
if ((getGetVersionInfoMethod = NetworkServiceGrpc.getGetVersionInfoMethod) == null) {
synchronized (NetworkServiceGrpc.class) {
if ((getGetVersionInfoMethod = NetworkServiceGrpc.getGetVersionInfoMethod) == null) {
NetworkServiceGrpc.getGetVersionInfoMethod = getGetVersionInfoMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "getVersionInfo"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hedera.hashgraph.sdk.proto.Query.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hedera.hashgraph.sdk.proto.Response.getDefaultInstance()))
.setSchemaDescriptor(new NetworkServiceMethodDescriptorSupplier("getVersionInfo"))
.build();
}
}
}
return getGetVersionInfoMethod;
}
private static volatile io.grpc.MethodDescriptor getGetExecutionTimeMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "getExecutionTime",
requestType = com.hedera.hashgraph.sdk.proto.Query.class,
responseType = com.hedera.hashgraph.sdk.proto.Response.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetExecutionTimeMethod() {
io.grpc.MethodDescriptor getGetExecutionTimeMethod;
if ((getGetExecutionTimeMethod = NetworkServiceGrpc.getGetExecutionTimeMethod) == null) {
synchronized (NetworkServiceGrpc.class) {
if ((getGetExecutionTimeMethod = NetworkServiceGrpc.getGetExecutionTimeMethod) == null) {
NetworkServiceGrpc.getGetExecutionTimeMethod = getGetExecutionTimeMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "getExecutionTime"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hedera.hashgraph.sdk.proto.Query.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hedera.hashgraph.sdk.proto.Response.getDefaultInstance()))
.setSchemaDescriptor(new NetworkServiceMethodDescriptorSupplier("getExecutionTime"))
.build();
}
}
}
return getGetExecutionTimeMethod;
}
private static volatile io.grpc.MethodDescriptor getUncheckedSubmitMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "uncheckedSubmit",
requestType = com.hedera.hashgraph.sdk.proto.Transaction.class,
responseType = com.hedera.hashgraph.sdk.proto.TransactionResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getUncheckedSubmitMethod() {
io.grpc.MethodDescriptor getUncheckedSubmitMethod;
if ((getUncheckedSubmitMethod = NetworkServiceGrpc.getUncheckedSubmitMethod) == null) {
synchronized (NetworkServiceGrpc.class) {
if ((getUncheckedSubmitMethod = NetworkServiceGrpc.getUncheckedSubmitMethod) == null) {
NetworkServiceGrpc.getUncheckedSubmitMethod = getUncheckedSubmitMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "uncheckedSubmit"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hedera.hashgraph.sdk.proto.Transaction.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hedera.hashgraph.sdk.proto.TransactionResponse.getDefaultInstance()))
.setSchemaDescriptor(new NetworkServiceMethodDescriptorSupplier("uncheckedSubmit"))
.build();
}
}
}
return getUncheckedSubmitMethod;
}
private static volatile io.grpc.MethodDescriptor getGetAccountDetailsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "getAccountDetails",
requestType = com.hedera.hashgraph.sdk.proto.Query.class,
responseType = com.hedera.hashgraph.sdk.proto.Response.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetAccountDetailsMethod() {
io.grpc.MethodDescriptor getGetAccountDetailsMethod;
if ((getGetAccountDetailsMethod = NetworkServiceGrpc.getGetAccountDetailsMethod) == null) {
synchronized (NetworkServiceGrpc.class) {
if ((getGetAccountDetailsMethod = NetworkServiceGrpc.getGetAccountDetailsMethod) == null) {
NetworkServiceGrpc.getGetAccountDetailsMethod = getGetAccountDetailsMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "getAccountDetails"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hedera.hashgraph.sdk.proto.Query.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hedera.hashgraph.sdk.proto.Response.getDefaultInstance()))
.setSchemaDescriptor(new NetworkServiceMethodDescriptorSupplier("getAccountDetails"))
.build();
}
}
}
return getGetAccountDetailsMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static NetworkServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public NetworkServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new NetworkServiceStub(channel, callOptions);
}
};
return NetworkServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static NetworkServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public NetworkServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new NetworkServiceBlockingStub(channel, callOptions);
}
};
return NetworkServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static NetworkServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public NetworkServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new NetworkServiceFutureStub(channel, callOptions);
}
};
return NetworkServiceFutureStub.newStub(factory, channel);
}
/**
*
**
* The requests and responses for different network services.
*
*/
public static abstract class NetworkServiceImplBase implements io.grpc.BindableService {
/**
*
**
* Retrieves the active versions of Hedera Services and HAPI proto
*
*/
public void getVersionInfo(com.hedera.hashgraph.sdk.proto.Query request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetVersionInfoMethod(), responseObserver);
}
/**
*
**
* Retrieves the time in nanoseconds spent in <tt>handleTransaction</tt> for one or more
* TransactionIDs (assuming they have reached consensus "recently", since only a limited
* number of execution times are kept in-memory, depending on the value of the node-local
* property <tt>stats.executionTimesToTrack</tt>).
*
*/
public void getExecutionTime(com.hedera.hashgraph.sdk.proto.Query request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetExecutionTimeMethod(), responseObserver);
}
/**
*
**
* Submits a "wrapped" transaction to the network, skipping its standard prechecks. (Note that
* the "wrapper" <tt>UncheckedSubmit</tt> transaction is still subject to normal prechecks,
* including an authorization requirement that its payer be either the treasury or system admin
* account.)
*
*/
public void uncheckedSubmit(com.hedera.hashgraph.sdk.proto.Transaction request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUncheckedSubmitMethod(), responseObserver);
}
/**
*
**
* Get all the information about an account, including balance and allowances. This does not get the list of
* account records.
*
*/
public void getAccountDetails(com.hedera.hashgraph.sdk.proto.Query request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAccountDetailsMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getGetVersionInfoMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.hedera.hashgraph.sdk.proto.Query,
com.hedera.hashgraph.sdk.proto.Response>(
this, METHODID_GET_VERSION_INFO)))
.addMethod(
getGetExecutionTimeMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.hedera.hashgraph.sdk.proto.Query,
com.hedera.hashgraph.sdk.proto.Response>(
this, METHODID_GET_EXECUTION_TIME)))
.addMethod(
getUncheckedSubmitMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.hedera.hashgraph.sdk.proto.Transaction,
com.hedera.hashgraph.sdk.proto.TransactionResponse>(
this, METHODID_UNCHECKED_SUBMIT)))
.addMethod(
getGetAccountDetailsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.hedera.hashgraph.sdk.proto.Query,
com.hedera.hashgraph.sdk.proto.Response>(
this, METHODID_GET_ACCOUNT_DETAILS)))
.build();
}
}
/**
*
**
* The requests and responses for different network services.
*
*/
public static final class NetworkServiceStub extends io.grpc.stub.AbstractAsyncStub {
private NetworkServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected NetworkServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new NetworkServiceStub(channel, callOptions);
}
/**
*
**
* Retrieves the active versions of Hedera Services and HAPI proto
*
*/
public void getVersionInfo(com.hedera.hashgraph.sdk.proto.Query request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetVersionInfoMethod(), getCallOptions()), request, responseObserver);
}
/**
*
**
* Retrieves the time in nanoseconds spent in <tt>handleTransaction</tt> for one or more
* TransactionIDs (assuming they have reached consensus "recently", since only a limited
* number of execution times are kept in-memory, depending on the value of the node-local
* property <tt>stats.executionTimesToTrack</tt>).
*
*/
public void getExecutionTime(com.hedera.hashgraph.sdk.proto.Query request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetExecutionTimeMethod(), getCallOptions()), request, responseObserver);
}
/**
*
**
* Submits a "wrapped" transaction to the network, skipping its standard prechecks. (Note that
* the "wrapper" <tt>UncheckedSubmit</tt> transaction is still subject to normal prechecks,
* including an authorization requirement that its payer be either the treasury or system admin
* account.)
*
*/
public void uncheckedSubmit(com.hedera.hashgraph.sdk.proto.Transaction request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getUncheckedSubmitMethod(), getCallOptions()), request, responseObserver);
}
/**
*
**
* Get all the information about an account, including balance and allowances. This does not get the list of
* account records.
*
*/
public void getAccountDetails(com.hedera.hashgraph.sdk.proto.Query request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetAccountDetailsMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*
**
* The requests and responses for different network services.
*
*/
public static final class NetworkServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private NetworkServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected NetworkServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new NetworkServiceBlockingStub(channel, callOptions);
}
/**
*
**
* Retrieves the active versions of Hedera Services and HAPI proto
*
*/
public com.hedera.hashgraph.sdk.proto.Response getVersionInfo(com.hedera.hashgraph.sdk.proto.Query request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetVersionInfoMethod(), getCallOptions(), request);
}
/**
*
**
* Retrieves the time in nanoseconds spent in <tt>handleTransaction</tt> for one or more
* TransactionIDs (assuming they have reached consensus "recently", since only a limited
* number of execution times are kept in-memory, depending on the value of the node-local
* property <tt>stats.executionTimesToTrack</tt>).
*
*/
public com.hedera.hashgraph.sdk.proto.Response getExecutionTime(com.hedera.hashgraph.sdk.proto.Query request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetExecutionTimeMethod(), getCallOptions(), request);
}
/**
*
**
* Submits a "wrapped" transaction to the network, skipping its standard prechecks. (Note that
* the "wrapper" <tt>UncheckedSubmit</tt> transaction is still subject to normal prechecks,
* including an authorization requirement that its payer be either the treasury or system admin
* account.)
*
*/
public com.hedera.hashgraph.sdk.proto.TransactionResponse uncheckedSubmit(com.hedera.hashgraph.sdk.proto.Transaction request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getUncheckedSubmitMethod(), getCallOptions(), request);
}
/**
*
**
* Get all the information about an account, including balance and allowances. This does not get the list of
* account records.
*
*/
public com.hedera.hashgraph.sdk.proto.Response getAccountDetails(com.hedera.hashgraph.sdk.proto.Query request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetAccountDetailsMethod(), getCallOptions(), request);
}
}
/**
*
**
* The requests and responses for different network services.
*
*/
public static final class NetworkServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
private NetworkServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected NetworkServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new NetworkServiceFutureStub(channel, callOptions);
}
/**
*
**
* Retrieves the active versions of Hedera Services and HAPI proto
*
*/
public com.google.common.util.concurrent.ListenableFuture getVersionInfo(
com.hedera.hashgraph.sdk.proto.Query request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetVersionInfoMethod(), getCallOptions()), request);
}
/**
*
**
* Retrieves the time in nanoseconds spent in <tt>handleTransaction</tt> for one or more
* TransactionIDs (assuming they have reached consensus "recently", since only a limited
* number of execution times are kept in-memory, depending on the value of the node-local
* property <tt>stats.executionTimesToTrack</tt>).
*
*/
public com.google.common.util.concurrent.ListenableFuture getExecutionTime(
com.hedera.hashgraph.sdk.proto.Query request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetExecutionTimeMethod(), getCallOptions()), request);
}
/**
*
**
* Submits a "wrapped" transaction to the network, skipping its standard prechecks. (Note that
* the "wrapper" <tt>UncheckedSubmit</tt> transaction is still subject to normal prechecks,
* including an authorization requirement that its payer be either the treasury or system admin
* account.)
*
*/
public com.google.common.util.concurrent.ListenableFuture uncheckedSubmit(
com.hedera.hashgraph.sdk.proto.Transaction request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getUncheckedSubmitMethod(), getCallOptions()), request);
}
/**
*
**
* Get all the information about an account, including balance and allowances. This does not get the list of
* account records.
*
*/
public com.google.common.util.concurrent.ListenableFuture getAccountDetails(
com.hedera.hashgraph.sdk.proto.Query request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetAccountDetailsMethod(), getCallOptions()), request);
}
}
private static final int METHODID_GET_VERSION_INFO = 0;
private static final int METHODID_GET_EXECUTION_TIME = 1;
private static final int METHODID_UNCHECKED_SUBMIT = 2;
private static final int METHODID_GET_ACCOUNT_DETAILS = 3;
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 NetworkServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(NetworkServiceImplBase 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_VERSION_INFO:
serviceImpl.getVersionInfo((com.hedera.hashgraph.sdk.proto.Query) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_EXECUTION_TIME:
serviceImpl.getExecutionTime((com.hedera.hashgraph.sdk.proto.Query) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_UNCHECKED_SUBMIT:
serviceImpl.uncheckedSubmit((com.hedera.hashgraph.sdk.proto.Transaction) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_ACCOUNT_DETAILS:
serviceImpl.getAccountDetails((com.hedera.hashgraph.sdk.proto.Query) 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 NetworkServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
NetworkServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.hedera.hashgraph.sdk.proto.NetworkServiceOuterClass.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("NetworkService");
}
}
private static final class NetworkServiceFileDescriptorSupplier
extends NetworkServiceBaseDescriptorSupplier {
NetworkServiceFileDescriptorSupplier() {}
}
private static final class NetworkServiceMethodDescriptorSupplier
extends NetworkServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
NetworkServiceMethodDescriptorSupplier(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 (NetworkServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new NetworkServiceFileDescriptorSupplier())
.addMethod(getGetVersionInfoMethod())
.addMethod(getGetExecutionTimeMethod())
.addMethod(getUncheckedSubmitMethod())
.addMethod(getGetAccountDetailsMethod())
.build();
}
}
}
return result;
}
}