程序包 org.elastos.hive

类 ServiceEndpoint

  • 直接已知子类:
    Backup, BackupSubscription, Provider, ScriptRunner, Vault, VaultSubscription

    public class ServiceEndpoint
    extends NodeRPCConnection
    The service end-point represents the service provides some API functions. It supports:
    • Access token management.
    • Local cache for the access token.
    • The service DID of the hive node.
    • The provider address.

    The service end-point is just like the map of the hive node. The application can communicate with the hive node APIs by its sub-class.

    • 构造器详细资料

      • ServiceEndpoint

        protected ServiceEndpoint​(AppContext context,
                                  java.lang.String providerAddress)
        Create by the application context, and the address of the provider. They are not all null.
        参数:
        context - The application context. Access token is not required if null.
        providerAddress - The address of the provider.
    • 方法详细资料

      • getAppContext

        public AppContext getAppContext()
        Get the application context.
        返回:
        The application context.
      • getProviderAddress

        public java.lang.String getProviderAddress()
        Get the end-point address of this service End-point.
        指定者:
        getProviderAddress 在类中 NodeRPCConnection
        返回:
        provider address
      • getUserDid

        public java.lang.String getUserDid()
        Get the user DID string of this serviceEndpoint.
        返回:
        user did
      • getAppDid

        public java.lang.String getAppDid()
        Get the application DID in the current calling context.
        返回:
        application did
      • getAppInstanceDid

        public java.lang.String getAppInstanceDid()
        Get the application instance DID in the current calling context;
        返回:
        application instance did
      • getServiceDid

        public java.lang.String getServiceDid()
        Get the remote node service application DID.
        返回:
        node service did
      • getServiceInstanceDid

        public java.lang.String getServiceInstanceDid()
        Get the remote node service instance DID where is serving the storage service.
        返回:
        node service instance did
      • getStorage

        public DataStorage getStorage()
        Get the instance of the data storage.
        返回:
        The instance of the data storage.
      • getNodeVersion

        public java.util.concurrent.CompletableFuture<NodeVersion> getNodeVersion()
        Get the version of the hive node.
        返回:
        The version of the hive node.
      • getLatestCommitId

        public java.util.concurrent.CompletableFuture<java.lang.String> getLatestCommitId()
        Get the last commit ID of the hive node.
        返回:
        The last commit ID.
      • getNodeInfo

        public java.util.concurrent.CompletableFuture<NodeInfo> getNodeInfo()
        Get the information of the hive node.
        返回:
        The information.