com.hederahashgraph.service.proto.java.ScheduleServiceGrpc Maven / Gradle / Ivy
The newest version!
package com.hederahashgraph.service.proto.java;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
**
* Transactions and queries for the Schedule Service
* The Schedule Service allows transactions to be submitted without all the required signatures and
* allows anyone to provide the required signatures independently after a transaction has already
* been created. The transactions can be executed immediately when all required signatures are received
* or at a future date if Long Term Scheduled Transactions are enabled.
* Execution:
* Scheduled Transactions are executed in two different modes.
* 1. If Long Term Scheduled Transactions are enabled and <tt>wait_for_expiry</tt> was set to <tt>true</tt> on the
* <tt>ScheduleCreate</tt>, then the transaction will be executed at the <tt>expiration_time</tt> specified on the
* <tt>ScheduleCreate</tt>.
* 2. Otherwise Scheduled Transactions are executed once all required signatures are collected and witnessed.
* Every time new signature is provided, a check is performed on the "readiness" of the execution.
* The Scheduled Transaction will be executed immediately after the transaction that triggered it.
* NOTICE:
* A Scheduled Transaction being ready to execute, or even not ready to execute, at the time a <tt>ScheduleCreate</tt> or
* <tt>ScheduleSign</tt> comes in does not guarantee it will stay that way. Any number of things can happen over time that
* impact the transaction.
* For example, account keys can change, accounts can be deleted, and account balances can change.
* A particularly noteworthy case is if Long Term Scheduled Transactions are enabled and signature requirements for a Scheduled
* Transaction change such that existing signatures become sufficient to allow the transaction to go through. In this case the transaction
* will execute at expiration_time unless a ScheduleSign comes in to push it through.
* Transaction Record:
* If a Scheduled Transaction is executed immediately following the transaction that provided all required signatures,
* the timestamp of the Scheduled Transaction will be equal to consensusTimestamp + 1 nano, where
* consensusTimestamp is the timestamp of the transaction that triggered the execution.
* The Transaction ID of the Scheduled Transaction will have the scheduled property set to true and
* inherit the <tt>transactionValidStart</tt> and <tt>accountID</tt> from the <tt>ScheduleCreate</tt> transaction.
* The <tt>scheduleRef</tt> property of the transaction record will be populated with the <tt>ScheduleID</tt> of the
* Scheduled Transaction.
* Post execution:
* After execution, a Scheduled Transaction will remain in state and can be queried using <tt>GetScheduleInfo</tt> until expiration.
* Expiry:
* The expiration time of a schedule is controlled by it's <tt>expiration_time</tt>. If Long Term Scheduled Transactions are disabled,
* the <tt>expiration_time</tt> is always 30 minutes in the future.
* Once a given Scheduled Transaction expires, it will be removed from the ledger and any upcoming
* operation referring the ScheduleID will resolve to INVALID_SCHEDULE_ID.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.45.1)",
comments = "Source: schedule_service.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ScheduleServiceGrpc {
private ScheduleServiceGrpc() {}
public static final String SERVICE_NAME = "proto.ScheduleService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getCreateScheduleMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "createSchedule",
requestType = com.hederahashgraph.api.proto.java.Transaction.class,
responseType = com.hederahashgraph.api.proto.java.TransactionResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getCreateScheduleMethod() {
io.grpc.MethodDescriptor getCreateScheduleMethod;
if ((getCreateScheduleMethod = ScheduleServiceGrpc.getCreateScheduleMethod) == null) {
synchronized (ScheduleServiceGrpc.class) {
if ((getCreateScheduleMethod = ScheduleServiceGrpc.getCreateScheduleMethod) == null) {
ScheduleServiceGrpc.getCreateScheduleMethod = getCreateScheduleMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "createSchedule"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hederahashgraph.api.proto.java.Transaction.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hederahashgraph.api.proto.java.TransactionResponse.getDefaultInstance()))
.setSchemaDescriptor(new ScheduleServiceMethodDescriptorSupplier("createSchedule"))
.build();
}
}
}
return getCreateScheduleMethod;
}
private static volatile io.grpc.MethodDescriptor getSignScheduleMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "signSchedule",
requestType = com.hederahashgraph.api.proto.java.Transaction.class,
responseType = com.hederahashgraph.api.proto.java.TransactionResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getSignScheduleMethod() {
io.grpc.MethodDescriptor getSignScheduleMethod;
if ((getSignScheduleMethod = ScheduleServiceGrpc.getSignScheduleMethod) == null) {
synchronized (ScheduleServiceGrpc.class) {
if ((getSignScheduleMethod = ScheduleServiceGrpc.getSignScheduleMethod) == null) {
ScheduleServiceGrpc.getSignScheduleMethod = getSignScheduleMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "signSchedule"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hederahashgraph.api.proto.java.Transaction.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hederahashgraph.api.proto.java.TransactionResponse.getDefaultInstance()))
.setSchemaDescriptor(new ScheduleServiceMethodDescriptorSupplier("signSchedule"))
.build();
}
}
}
return getSignScheduleMethod;
}
private static volatile io.grpc.MethodDescriptor getDeleteScheduleMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "deleteSchedule",
requestType = com.hederahashgraph.api.proto.java.Transaction.class,
responseType = com.hederahashgraph.api.proto.java.TransactionResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getDeleteScheduleMethod() {
io.grpc.MethodDescriptor getDeleteScheduleMethod;
if ((getDeleteScheduleMethod = ScheduleServiceGrpc.getDeleteScheduleMethod) == null) {
synchronized (ScheduleServiceGrpc.class) {
if ((getDeleteScheduleMethod = ScheduleServiceGrpc.getDeleteScheduleMethod) == null) {
ScheduleServiceGrpc.getDeleteScheduleMethod = getDeleteScheduleMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "deleteSchedule"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hederahashgraph.api.proto.java.Transaction.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hederahashgraph.api.proto.java.TransactionResponse.getDefaultInstance()))
.setSchemaDescriptor(new ScheduleServiceMethodDescriptorSupplier("deleteSchedule"))
.build();
}
}
}
return getDeleteScheduleMethod;
}
private static volatile io.grpc.MethodDescriptor getGetScheduleInfoMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "getScheduleInfo",
requestType = com.hederahashgraph.api.proto.java.Query.class,
responseType = com.hederahashgraph.api.proto.java.Response.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetScheduleInfoMethod() {
io.grpc.MethodDescriptor getGetScheduleInfoMethod;
if ((getGetScheduleInfoMethod = ScheduleServiceGrpc.getGetScheduleInfoMethod) == null) {
synchronized (ScheduleServiceGrpc.class) {
if ((getGetScheduleInfoMethod = ScheduleServiceGrpc.getGetScheduleInfoMethod) == null) {
ScheduleServiceGrpc.getGetScheduleInfoMethod = getGetScheduleInfoMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "getScheduleInfo"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hederahashgraph.api.proto.java.Query.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.hederahashgraph.api.proto.java.Response.getDefaultInstance()))
.setSchemaDescriptor(new ScheduleServiceMethodDescriptorSupplier("getScheduleInfo"))
.build();
}
}
}
return getGetScheduleInfoMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static ScheduleServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ScheduleServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ScheduleServiceStub(channel, callOptions);
}
};
return ScheduleServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ScheduleServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ScheduleServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ScheduleServiceBlockingStub(channel, callOptions);
}
};
return ScheduleServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ScheduleServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ScheduleServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ScheduleServiceFutureStub(channel, callOptions);
}
};
return ScheduleServiceFutureStub.newStub(factory, channel);
}
/**
*
**
* Transactions and queries for the Schedule Service
* The Schedule Service allows transactions to be submitted without all the required signatures and
* allows anyone to provide the required signatures independently after a transaction has already
* been created. The transactions can be executed immediately when all required signatures are received
* or at a future date if Long Term Scheduled Transactions are enabled.
* Execution:
* Scheduled Transactions are executed in two different modes.
* 1. If Long Term Scheduled Transactions are enabled and <tt>wait_for_expiry</tt> was set to <tt>true</tt> on the
* <tt>ScheduleCreate</tt>, then the transaction will be executed at the <tt>expiration_time</tt> specified on the
* <tt>ScheduleCreate</tt>.
* 2. Otherwise Scheduled Transactions are executed once all required signatures are collected and witnessed.
* Every time new signature is provided, a check is performed on the "readiness" of the execution.
* The Scheduled Transaction will be executed immediately after the transaction that triggered it.
* NOTICE:
* A Scheduled Transaction being ready to execute, or even not ready to execute, at the time a <tt>ScheduleCreate</tt> or
* <tt>ScheduleSign</tt> comes in does not guarantee it will stay that way. Any number of things can happen over time that
* impact the transaction.
* For example, account keys can change, accounts can be deleted, and account balances can change.
* A particularly noteworthy case is if Long Term Scheduled Transactions are enabled and signature requirements for a Scheduled
* Transaction change such that existing signatures become sufficient to allow the transaction to go through. In this case the transaction
* will execute at expiration_time unless a ScheduleSign comes in to push it through.
* Transaction Record:
* If a Scheduled Transaction is executed immediately following the transaction that provided all required signatures,
* the timestamp of the Scheduled Transaction will be equal to consensusTimestamp + 1 nano, where
* consensusTimestamp is the timestamp of the transaction that triggered the execution.
* The Transaction ID of the Scheduled Transaction will have the scheduled property set to true and
* inherit the <tt>transactionValidStart</tt> and <tt>accountID</tt> from the <tt>ScheduleCreate</tt> transaction.
* The <tt>scheduleRef</tt> property of the transaction record will be populated with the <tt>ScheduleID</tt> of the
* Scheduled Transaction.
* Post execution:
* After execution, a Scheduled Transaction will remain in state and can be queried using <tt>GetScheduleInfo</tt> until expiration.
* Expiry:
* The expiration time of a schedule is controlled by it's <tt>expiration_time</tt>. If Long Term Scheduled Transactions are disabled,
* the <tt>expiration_time</tt> is always 30 minutes in the future.
* Once a given Scheduled Transaction expires, it will be removed from the ledger and any upcoming
* operation referring the ScheduleID will resolve to INVALID_SCHEDULE_ID.
*
*/
public static abstract class ScheduleServiceImplBase implements io.grpc.BindableService {
/**
*
**
* Creates a new Schedule by submitting the transaction
*
*/
public void createSchedule(com.hederahashgraph.api.proto.java.Transaction request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateScheduleMethod(), responseObserver);
}
/**
*
**
* Signs a new Schedule by submitting the transaction
*
*/
public void signSchedule(com.hederahashgraph.api.proto.java.Transaction request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSignScheduleMethod(), responseObserver);
}
/**
*
**
* Deletes a new Schedule by submitting the transaction
*
*/
public void deleteSchedule(com.hederahashgraph.api.proto.java.Transaction request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteScheduleMethod(), responseObserver);
}
/**
*
**
* Retrieves the metadata of a schedule entity
*
*/
public void getScheduleInfo(com.hederahashgraph.api.proto.java.Query request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetScheduleInfoMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getCreateScheduleMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.hederahashgraph.api.proto.java.Transaction,
com.hederahashgraph.api.proto.java.TransactionResponse>(
this, METHODID_CREATE_SCHEDULE)))
.addMethod(
getSignScheduleMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.hederahashgraph.api.proto.java.Transaction,
com.hederahashgraph.api.proto.java.TransactionResponse>(
this, METHODID_SIGN_SCHEDULE)))
.addMethod(
getDeleteScheduleMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.hederahashgraph.api.proto.java.Transaction,
com.hederahashgraph.api.proto.java.TransactionResponse>(
this, METHODID_DELETE_SCHEDULE)))
.addMethod(
getGetScheduleInfoMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.hederahashgraph.api.proto.java.Query,
com.hederahashgraph.api.proto.java.Response>(
this, METHODID_GET_SCHEDULE_INFO)))
.build();
}
}
/**
*
**
* Transactions and queries for the Schedule Service
* The Schedule Service allows transactions to be submitted without all the required signatures and
* allows anyone to provide the required signatures independently after a transaction has already
* been created. The transactions can be executed immediately when all required signatures are received
* or at a future date if Long Term Scheduled Transactions are enabled.
* Execution:
* Scheduled Transactions are executed in two different modes.
* 1. If Long Term Scheduled Transactions are enabled and <tt>wait_for_expiry</tt> was set to <tt>true</tt> on the
* <tt>ScheduleCreate</tt>, then the transaction will be executed at the <tt>expiration_time</tt> specified on the
* <tt>ScheduleCreate</tt>.
* 2. Otherwise Scheduled Transactions are executed once all required signatures are collected and witnessed.
* Every time new signature is provided, a check is performed on the "readiness" of the execution.
* The Scheduled Transaction will be executed immediately after the transaction that triggered it.
* NOTICE:
* A Scheduled Transaction being ready to execute, or even not ready to execute, at the time a <tt>ScheduleCreate</tt> or
* <tt>ScheduleSign</tt> comes in does not guarantee it will stay that way. Any number of things can happen over time that
* impact the transaction.
* For example, account keys can change, accounts can be deleted, and account balances can change.
* A particularly noteworthy case is if Long Term Scheduled Transactions are enabled and signature requirements for a Scheduled
* Transaction change such that existing signatures become sufficient to allow the transaction to go through. In this case the transaction
* will execute at expiration_time unless a ScheduleSign comes in to push it through.
* Transaction Record:
* If a Scheduled Transaction is executed immediately following the transaction that provided all required signatures,
* the timestamp of the Scheduled Transaction will be equal to consensusTimestamp + 1 nano, where
* consensusTimestamp is the timestamp of the transaction that triggered the execution.
* The Transaction ID of the Scheduled Transaction will have the scheduled property set to true and
* inherit the <tt>transactionValidStart</tt> and <tt>accountID</tt> from the <tt>ScheduleCreate</tt> transaction.
* The <tt>scheduleRef</tt> property of the transaction record will be populated with the <tt>ScheduleID</tt> of the
* Scheduled Transaction.
* Post execution:
* After execution, a Scheduled Transaction will remain in state and can be queried using <tt>GetScheduleInfo</tt> until expiration.
* Expiry:
* The expiration time of a schedule is controlled by it's <tt>expiration_time</tt>. If Long Term Scheduled Transactions are disabled,
* the <tt>expiration_time</tt> is always 30 minutes in the future.
* Once a given Scheduled Transaction expires, it will be removed from the ledger and any upcoming
* operation referring the ScheduleID will resolve to INVALID_SCHEDULE_ID.
*
*/
public static final class ScheduleServiceStub extends io.grpc.stub.AbstractAsyncStub {
private ScheduleServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ScheduleServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ScheduleServiceStub(channel, callOptions);
}
/**
*
**
* Creates a new Schedule by submitting the transaction
*
*/
public void createSchedule(com.hederahashgraph.api.proto.java.Transaction request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getCreateScheduleMethod(), getCallOptions()), request, responseObserver);
}
/**
*
**
* Signs a new Schedule by submitting the transaction
*
*/
public void signSchedule(com.hederahashgraph.api.proto.java.Transaction request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getSignScheduleMethod(), getCallOptions()), request, responseObserver);
}
/**
*
**
* Deletes a new Schedule by submitting the transaction
*
*/
public void deleteSchedule(com.hederahashgraph.api.proto.java.Transaction request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDeleteScheduleMethod(), getCallOptions()), request, responseObserver);
}
/**
*
**
* Retrieves the metadata of a schedule entity
*
*/
public void getScheduleInfo(com.hederahashgraph.api.proto.java.Query request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetScheduleInfoMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*
**
* Transactions and queries for the Schedule Service
* The Schedule Service allows transactions to be submitted without all the required signatures and
* allows anyone to provide the required signatures independently after a transaction has already
* been created. The transactions can be executed immediately when all required signatures are received
* or at a future date if Long Term Scheduled Transactions are enabled.
* Execution:
* Scheduled Transactions are executed in two different modes.
* 1. If Long Term Scheduled Transactions are enabled and <tt>wait_for_expiry</tt> was set to <tt>true</tt> on the
* <tt>ScheduleCreate</tt>, then the transaction will be executed at the <tt>expiration_time</tt> specified on the
* <tt>ScheduleCreate</tt>.
* 2. Otherwise Scheduled Transactions are executed once all required signatures are collected and witnessed.
* Every time new signature is provided, a check is performed on the "readiness" of the execution.
* The Scheduled Transaction will be executed immediately after the transaction that triggered it.
* NOTICE:
* A Scheduled Transaction being ready to execute, or even not ready to execute, at the time a <tt>ScheduleCreate</tt> or
* <tt>ScheduleSign</tt> comes in does not guarantee it will stay that way. Any number of things can happen over time that
* impact the transaction.
* For example, account keys can change, accounts can be deleted, and account balances can change.
* A particularly noteworthy case is if Long Term Scheduled Transactions are enabled and signature requirements for a Scheduled
* Transaction change such that existing signatures become sufficient to allow the transaction to go through. In this case the transaction
* will execute at expiration_time unless a ScheduleSign comes in to push it through.
* Transaction Record:
* If a Scheduled Transaction is executed immediately following the transaction that provided all required signatures,
* the timestamp of the Scheduled Transaction will be equal to consensusTimestamp + 1 nano, where
* consensusTimestamp is the timestamp of the transaction that triggered the execution.
* The Transaction ID of the Scheduled Transaction will have the scheduled property set to true and
* inherit the <tt>transactionValidStart</tt> and <tt>accountID</tt> from the <tt>ScheduleCreate</tt> transaction.
* The <tt>scheduleRef</tt> property of the transaction record will be populated with the <tt>ScheduleID</tt> of the
* Scheduled Transaction.
* Post execution:
* After execution, a Scheduled Transaction will remain in state and can be queried using <tt>GetScheduleInfo</tt> until expiration.
* Expiry:
* The expiration time of a schedule is controlled by it's <tt>expiration_time</tt>. If Long Term Scheduled Transactions are disabled,
* the <tt>expiration_time</tt> is always 30 minutes in the future.
* Once a given Scheduled Transaction expires, it will be removed from the ledger and any upcoming
* operation referring the ScheduleID will resolve to INVALID_SCHEDULE_ID.
*
*/
public static final class ScheduleServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private ScheduleServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ScheduleServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ScheduleServiceBlockingStub(channel, callOptions);
}
/**
*
**
* Creates a new Schedule by submitting the transaction
*
*/
public com.hederahashgraph.api.proto.java.TransactionResponse createSchedule(com.hederahashgraph.api.proto.java.Transaction request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCreateScheduleMethod(), getCallOptions(), request);
}
/**
*
**
* Signs a new Schedule by submitting the transaction
*
*/
public com.hederahashgraph.api.proto.java.TransactionResponse signSchedule(com.hederahashgraph.api.proto.java.Transaction request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getSignScheduleMethod(), getCallOptions(), request);
}
/**
*
**
* Deletes a new Schedule by submitting the transaction
*
*/
public com.hederahashgraph.api.proto.java.TransactionResponse deleteSchedule(com.hederahashgraph.api.proto.java.Transaction request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDeleteScheduleMethod(), getCallOptions(), request);
}
/**
*
**
* Retrieves the metadata of a schedule entity
*
*/
public com.hederahashgraph.api.proto.java.Response getScheduleInfo(com.hederahashgraph.api.proto.java.Query request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetScheduleInfoMethod(), getCallOptions(), request);
}
}
/**
*
**
* Transactions and queries for the Schedule Service
* The Schedule Service allows transactions to be submitted without all the required signatures and
* allows anyone to provide the required signatures independently after a transaction has already
* been created. The transactions can be executed immediately when all required signatures are received
* or at a future date if Long Term Scheduled Transactions are enabled.
* Execution:
* Scheduled Transactions are executed in two different modes.
* 1. If Long Term Scheduled Transactions are enabled and <tt>wait_for_expiry</tt> was set to <tt>true</tt> on the
* <tt>ScheduleCreate</tt>, then the transaction will be executed at the <tt>expiration_time</tt> specified on the
* <tt>ScheduleCreate</tt>.
* 2. Otherwise Scheduled Transactions are executed once all required signatures are collected and witnessed.
* Every time new signature is provided, a check is performed on the "readiness" of the execution.
* The Scheduled Transaction will be executed immediately after the transaction that triggered it.
* NOTICE:
* A Scheduled Transaction being ready to execute, or even not ready to execute, at the time a <tt>ScheduleCreate</tt> or
* <tt>ScheduleSign</tt> comes in does not guarantee it will stay that way. Any number of things can happen over time that
* impact the transaction.
* For example, account keys can change, accounts can be deleted, and account balances can change.
* A particularly noteworthy case is if Long Term Scheduled Transactions are enabled and signature requirements for a Scheduled
* Transaction change such that existing signatures become sufficient to allow the transaction to go through. In this case the transaction
* will execute at expiration_time unless a ScheduleSign comes in to push it through.
* Transaction Record:
* If a Scheduled Transaction is executed immediately following the transaction that provided all required signatures,
* the timestamp of the Scheduled Transaction will be equal to consensusTimestamp + 1 nano, where
* consensusTimestamp is the timestamp of the transaction that triggered the execution.
* The Transaction ID of the Scheduled Transaction will have the scheduled property set to true and
* inherit the <tt>transactionValidStart</tt> and <tt>accountID</tt> from the <tt>ScheduleCreate</tt> transaction.
* The <tt>scheduleRef</tt> property of the transaction record will be populated with the <tt>ScheduleID</tt> of the
* Scheduled Transaction.
* Post execution:
* After execution, a Scheduled Transaction will remain in state and can be queried using <tt>GetScheduleInfo</tt> until expiration.
* Expiry:
* The expiration time of a schedule is controlled by it's <tt>expiration_time</tt>. If Long Term Scheduled Transactions are disabled,
* the <tt>expiration_time</tt> is always 30 minutes in the future.
* Once a given Scheduled Transaction expires, it will be removed from the ledger and any upcoming
* operation referring the ScheduleID will resolve to INVALID_SCHEDULE_ID.
*
*/
public static final class ScheduleServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
private ScheduleServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ScheduleServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ScheduleServiceFutureStub(channel, callOptions);
}
/**
*
**
* Creates a new Schedule by submitting the transaction
*
*/
public com.google.common.util.concurrent.ListenableFuture createSchedule(
com.hederahashgraph.api.proto.java.Transaction request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCreateScheduleMethod(), getCallOptions()), request);
}
/**
*
**
* Signs a new Schedule by submitting the transaction
*
*/
public com.google.common.util.concurrent.ListenableFuture signSchedule(
com.hederahashgraph.api.proto.java.Transaction request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getSignScheduleMethod(), getCallOptions()), request);
}
/**
*
**
* Deletes a new Schedule by submitting the transaction
*
*/
public com.google.common.util.concurrent.ListenableFuture deleteSchedule(
com.hederahashgraph.api.proto.java.Transaction request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDeleteScheduleMethod(), getCallOptions()), request);
}
/**
*
**
* Retrieves the metadata of a schedule entity
*
*/
public com.google.common.util.concurrent.ListenableFuture getScheduleInfo(
com.hederahashgraph.api.proto.java.Query request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetScheduleInfoMethod(), getCallOptions()), request);
}
}
private static final int METHODID_CREATE_SCHEDULE = 0;
private static final int METHODID_SIGN_SCHEDULE = 1;
private static final int METHODID_DELETE_SCHEDULE = 2;
private static final int METHODID_GET_SCHEDULE_INFO = 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 ScheduleServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(ScheduleServiceImplBase 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_CREATE_SCHEDULE:
serviceImpl.createSchedule((com.hederahashgraph.api.proto.java.Transaction) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_SIGN_SCHEDULE:
serviceImpl.signSchedule((com.hederahashgraph.api.proto.java.Transaction) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DELETE_SCHEDULE:
serviceImpl.deleteSchedule((com.hederahashgraph.api.proto.java.Transaction) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_SCHEDULE_INFO:
serviceImpl.getScheduleInfo((com.hederahashgraph.api.proto.java.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 ScheduleServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
ScheduleServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.hederahashgraph.service.proto.java.ScheduleServiceOuterClass.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("ScheduleService");
}
}
private static final class ScheduleServiceFileDescriptorSupplier
extends ScheduleServiceBaseDescriptorSupplier {
ScheduleServiceFileDescriptorSupplier() {}
}
private static final class ScheduleServiceMethodDescriptorSupplier
extends ScheduleServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
ScheduleServiceMethodDescriptorSupplier(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 (ScheduleServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new ScheduleServiceFileDescriptorSupplier())
.addMethod(getCreateScheduleMethod())
.addMethod(getSignScheduleMethod())
.addMethod(getDeleteScheduleMethod())
.addMethod(getGetScheduleInfoMethod())
.build();
}
}
}
return result;
}
}