程序包 org.elastos.hive

类 VaultSubscription

    • 构造器概要

      构造器 
      构造器 说明
      VaultSubscription​(AppContext context)
      Create by the application context, and the address of the provider.
      VaultSubscription​(AppContext context, java.lang.String providerAddress)
      Create by the application context, and the address of the provider.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      java.util.concurrent.CompletableFuture<java.lang.Void> activate()
      Activate the vault service.
      java.util.concurrent.CompletableFuture<VaultInfo> checkSubscription()
      Let the user to get the basic information of the subscription.
      java.util.concurrent.CompletableFuture<java.lang.Void> deactivate()
      Deactivate the vault service.
      java.util.concurrent.CompletableFuture<java.util.List<AppInfo>> getAppStats()
      Get all application stats of the vault service
      java.util.concurrent.CompletableFuture<Order> getOrder​(int orderId)
      Obtain the order detail according to the given order id.
      java.util.concurrent.CompletableFuture<java.util.List<Order>> getOrderList()
      Obtain all the list of order detail.
      java.util.concurrent.CompletableFuture<PricingPlan> getPricingPlan​(java.lang.String planName)
      Let users to get the specific pricing plan information.
      java.util.concurrent.CompletableFuture<java.util.List<PricingPlan>> getPricingPlanList()
      Let users to get the all the pricing plan list in order to subscribe to a new vault or backup service on the user's requirement.
      java.util.concurrent.CompletableFuture<Receipt> getReceipt​(int orderId)
      Obtain the receipt detail according to the order id.
      java.util.concurrent.CompletableFuture<java.util.List<Receipt>> getReceipts()
      Obtain the receipt of the vault.
      java.util.concurrent.CompletableFuture<java.lang.String> getVersion()
      Obtain the version of the payment module.
      java.util.concurrent.CompletableFuture<Order> placeOrder​(java.lang.String planName)
      Place an order for new subscription or extending the existing subscription service.
      java.util.concurrent.CompletableFuture<Receipt> settleOrder​(int orderId)
      Pay for the order with a given id.
      java.util.concurrent.CompletableFuture<VaultInfo> subscribe()
      Let a new user subscribe to the entity service on the specified back-end node, where the entity service would be vault or backup service.
      java.util.concurrent.CompletableFuture<java.lang.Void> unsubscribe()  
      java.util.concurrent.CompletableFuture<java.lang.Void> unsubscribe​(boolean force)
      Let user to unsubscribe to an existing but useless vault or backup service.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • VaultSubscription

        public VaultSubscription​(AppContext context,
                                 java.lang.String providerAddress)
                          throws HiveException
        Create by the application context, and the address of the provider.
        参数:
        context - The application context.
        providerAddress - The address of the provider.
        抛出:
        HiveException - See HiveException
    • 方法详细资料

      • getPricingPlanList

        public java.util.concurrent.CompletableFuture<java.util.List<PricingPlan>> getPricingPlanList()
        从接口复制的说明: SubscriptionService
        Let users to get the all the pricing plan list in order to subscribe to a new vault or backup service on the user's requirement.
        指定者:
        getPricingPlanList 在接口中 SubscriptionService<VaultInfo>
        返回:
        Return a list of all pricing plan with specific type on success. Otherwise, the specific exception would be returned.
      • getPricingPlan

        public java.util.concurrent.CompletableFuture<PricingPlan> getPricingPlan​(java.lang.String planName)
        从接口复制的说明: SubscriptionService
        Let users to get the specific pricing plan information.
        指定者:
        getPricingPlan 在接口中 SubscriptionService<VaultInfo>
        参数:
        planName - the name of the pricing plan
        返回:
        Return the specific pricing plan information on success. Otherwise, the specific exception would be returned.
      • subscribe

        public java.util.concurrent.CompletableFuture<VaultInfo> subscribe()
        从接口复制的说明: SubscriptionService
        Let a new user subscribe to the entity service on the specified back-end node, where the entity service would be vault or backup service. Currently this method would only support for subscription to a entity service with free pricing plan. When there is already a corresponding service existed, no new service would be subscribed or created.
        指定者:
        subscribe 在接口中 SubscriptionService<VaultInfo>
        返回:
        The basic information of the newly created or existing vault on success, otherwise, the specific exception would returned in the wrapper.
      • activate

        public java.util.concurrent.CompletableFuture<java.lang.Void> activate()
        从接口复制的说明: SubscriptionService
        Activate the vault service.
        指定者:
        activate 在接口中 SubscriptionService<VaultInfo>
        返回:
        None would be returned on success, otherwise, the specific exception would be returned.
      • deactivate

        public java.util.concurrent.CompletableFuture<java.lang.Void> deactivate()
        从接口复制的说明: SubscriptionService
        Deactivate the vault service.
        指定者:
        deactivate 在接口中 SubscriptionService<VaultInfo>
        返回:
        None would be returned on success, otherwise, the specific exception would be returned.
      • unsubscribe

        public java.util.concurrent.CompletableFuture<java.lang.Void> unsubscribe​(boolean force)
        从接口复制的说明: SubscriptionService
        Let user to unsubscribe to an existing but useless vault or backup service.
        指定者:
        unsubscribe 在接口中 SubscriptionService<VaultInfo>
        参数:
        force - whether force to remove the data.
        返回:
        None would be returned on success, otherwise, the specific exception would be returned.
      • checkSubscription

        public java.util.concurrent.CompletableFuture<VaultInfo> checkSubscription()
        从接口复制的说明: SubscriptionService
        Let the user to get the basic information of the subscription.
        指定者:
        checkSubscription 在接口中 SubscriptionService<VaultInfo>
        返回:
        The basic information of the newly created or existing vault on success, otherwise, the specific exception would returned in the wrapper.
      • placeOrder

        public java.util.concurrent.CompletableFuture<Order> placeOrder​(java.lang.String planName)
        从接口复制的说明: PaymentService
        Place an order for new subscription or extending the existing subscription service.
        指定者:
        placeOrder 在接口中 PaymentService
        参数:
        planName - the name of the pricing plan
        返回:
        return the new order detail when the request successfully was received by back-end node, otherwise return the specific exception.
      • getOrder

        public java.util.concurrent.CompletableFuture<Order> getOrder​(int orderId)
        从接口复制的说明: PaymentService
        Obtain the order detail according to the given order id.
        指定者:
        getOrder 在接口中 PaymentService
        参数:
        orderId - order id
        返回:
        return the order detail in case there is a order with order id existing. otherwise, return the specific exception.
      • settleOrder

        public java.util.concurrent.CompletableFuture<Receipt> settleOrder​(int orderId)
        从接口复制的说明: PaymentService
        Pay for the order with a given id.
        指定者:
        settleOrder 在接口中 PaymentService
        参数:
        orderId - order id of the payment contract
        返回:
        return the receipt detail in case the payment was accepted by hive node, otherwise return the specific exception.
      • getOrderList

        public java.util.concurrent.CompletableFuture<java.util.List<Order>> getOrderList()
        从接口复制的说明: PaymentService
        Obtain all the list of order detail.
        指定者:
        getOrderList 在接口中 PaymentService
        返回:
        return the list of order detail on success, otherwise, return the specific exception.
      • getReceipt

        public java.util.concurrent.CompletableFuture<Receipt> getReceipt​(int orderId)
        从接口复制的说明: PaymentService
        Obtain the receipt detail according to the order id.
        指定者:
        getReceipt 在接口中 PaymentService
        参数:
        orderId - order id.
        返回:
        return the receipt detail in case there is a receipt existing, otherwise, return the specific exception.
      • getReceipts

        public java.util.concurrent.CompletableFuture<java.util.List<Receipt>> getReceipts()
        从接口复制的说明: PaymentService
        Obtain the receipt of the vault.
        指定者:
        getReceipts 在接口中 PaymentService
        返回:
        return the receipt detail in case there is a receipt existing, otherwise, return the specific exception.
      • getVersion

        public java.util.concurrent.CompletableFuture<java.lang.String> getVersion()
        从接口复制的说明: PaymentService
        Obtain the version of the payment module.
        指定者:
        getVersion 在接口中 PaymentService
        返回:
        return the version, otherwise, return the specific exception.