Class FileServiceGrpc.FileServiceStub

java.lang.Object
io.grpc.stub.AbstractStub<FileServiceGrpc.FileServiceStub>
io.grpc.stub.AbstractAsyncStub<FileServiceGrpc.FileServiceStub>
com.hedera.hashgraph.sdk.proto.FileServiceGrpc.FileServiceStub
Enclosing class:
FileServiceGrpc

public static final class FileServiceGrpc.FileServiceStub extends io.grpc.stub.AbstractAsyncStub<FileServiceGrpc.FileServiceStub>
A stub to allow clients to do asynchronous rpc calls to service FileService.

 Service gRPC definitions for the Hedera File Service (HFS).
 #### Signature Requirements
 The HFS manages file authorization differently, depending on type of file
 transaction, and this can be surprising.<br/>
 The core element of file authorization is the `keys` field,
 which is a `KeyList`; a list of individual `Key` messages, each of which
 may represent a simple or complex key.<br/>
 The file service transactions treat this list differently.<br/>
 A `fileCreate`, `fileAppend`, or `fileUpdate` MUST have a valid signature
 from _each_ key in the list.<br/>
 A `fileDelete` MUST have a valid signature from _at least one_ key in
 the list. This is different, and allows a file "owned" by many entities
 to be deleted by any one of those entities. A deleted file cannot be
 restored, so it is important to consider this when assigning keys for
 a file.<br/>
 If any of the keys in a `KeyList` are complex, the full requirements of
 each complex key must be met to count as a "valid signature" for that key.
 A complex key structure (i.e. a `ThresholdKey`, or `KeyList`, possibly
 including additional `ThresholdKey` or `KeyList` descendants) may be
 assigned as the sole entry in a file `keys` field to ensure all transactions
 have the same signature requirements.
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub

    io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendContent(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
    Append content to a file in HFS.
    build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
     
    void
    createFile(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
    Create a file in HFS.
    void
    deleteFile(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
    Delete a file in HFS.<br/> The content of a file deleted in this manner is completely removed from network state, but the file metadata remains.
    void
    getFileContent(Query request, io.grpc.stub.StreamObserver<Response> responseObserver)
    Retrieve the content of a file in HFS.<br/> Note that this query retrieves _only_ the file content, not any of the metadata for the file.
    void
    getFileInfo(Query request, io.grpc.stub.StreamObserver<Response> responseObserver)
    Retrieve the metadata for a file in HFS.<br/> Note that this query does not retrieve the file _content_.
    void
    systemDelete(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
    Delete a "regular" file without "owner" authorization.<br/> This transaction _does not_ require signatures for the keys in the file `keys` list, but must be signed by a "privileged" account.
    void
    systemUndelete(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
    Undelete a "regular" file.
    void
    updateFile(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
    Update a file in HFS.

    Methods inherited from class io.grpc.stub.AbstractAsyncStub

    newStub, newStub

    Methods inherited from class io.grpc.stub.AbstractStub

    getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • build

      protected FileServiceGrpc.FileServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<FileServiceGrpc.FileServiceStub>
    • createFile

      public void createFile(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
      
       Create a file in HFS.
       
    • updateFile

      public void updateFile(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
      
       Update a file in HFS.
       
    • deleteFile

      public void deleteFile(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
      
       Delete a file in HFS.<br/>
       The content of a file deleted in this manner is completely removed
       from network state, but the file metadata remains.
       
    • appendContent

      public void appendContent(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
      
       Append content to a file in HFS.
       
    • getFileContent

      public void getFileContent(Query request, io.grpc.stub.StreamObserver<Response> responseObserver)
      
       Retrieve the content of a file in HFS.<br/>
       Note that this query retrieves _only_ the file content, not any of
       the metadata for the file.
       
    • getFileInfo

      public void getFileInfo(Query request, io.grpc.stub.StreamObserver<Response> responseObserver)
      
       Retrieve the metadata for a file in HFS.<br/>
       Note that this query does not retrieve the file _content_.
       
    • systemDelete

      public void systemDelete(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
      
       Delete a "regular" file without "owner" authorization.<br/>
       This transaction _does not_ require signatures for the keys in
       the file `keys` list, but must be signed by a "privileged" account.
       <p>
       This transaction SHALL NOT accept a file identifier for
       a "system" file.<br/>
       This transaction SHALL NOT remove the _content_ of the file from state.
       This permits use of the `systemUndelete` to reverse this action if
       performed in error.
       <p>
       This is a privileged transaction, and only accounts 2-59 are permitted
       to call this function, by default. The actual restriction is in the
       `api-permission.properties` file in the consensus node configuration.
       
    • systemUndelete

      public void systemUndelete(Transaction request, io.grpc.stub.StreamObserver<TransactionResponse> responseObserver)
      
       Undelete a "regular" file.
       This transaction must be signed by a "privileged" account.<br/>
       <p>
       This transaction SHALL NOT accept a file identifier for
       a "system" file.<br/>
       The file identified SHOULD have been previously deleted.<br/>
       This transaction SHALL NOT recover the _content_ of a file unless that
       file was deleted with a `systemDelete` transaction. The _content_ of a
       file deleted with a `fileDelete` transaction is not retained in state.
       <p>
       This is a privileged transaction, and only accounts 2-60 are permitted
       to call this function, by default. The actual restriction is in the
       `api-permission.properties` file in the consensus node configuration.