Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AGCStorageTask

en

Manages tasks and encapsulates operations on storage tasks in various states. This class is the parent class of UploadTask and DownloadTask.

zh

任务的管理,提供存储任务的各种状态操作的封装,是 UploadTask 和 DownloadTask 的父类。

Hierarchy

Index

Constructors

constructor

  • new AGCStorageTask(taskType: string, taskId: string): AGCStorageTask

Properties

Private cls_ServiceAGCStorage

cls_ServiceAGCStorage: string = "org/cocos2dx/javascript/service/storage/AGCStorageTaskManager"

Private taskId

taskId: string = ""

Private taskType

taskType: string = ""

Methods

cancel

  • cancel(): boolean
  • en

    Cancels a task.

    zh

    取消任务

    Returns boolean

    Result of canceling a task.

isCanceled

  • isCanceled(): boolean
  • en

    Determines whether a task is canceled.

    zh

    任务是否已取消

    Returns boolean

    Indicates whether a task is canceled.

isComplete

  • isComplete(): boolean
  • en

    Determines whether a task is complete.

    zh

    任务是否已完成

    Returns boolean

    Indicates whether a task is complete. Task success and failure are both considered as completion.

isInProgress

  • isInProgress(): boolean
  • en

    Determines whether a task is being executed.

    zh

    任务是否正在执行中

    Returns boolean

    Indicates whether a task is being executed.

isPaused

  • isPaused(): boolean
  • en

    Determines whether a task is suspended.

    zh

    任务是否已暂停

    Returns boolean

    Indicates whether a task is suspended.

isSuccessful

  • isSuccessful(): boolean
  • en

    Determines whether a task is successful.

    zh

    任务是否已成功

    Returns boolean

    Indicates whether a task is successful.

pause

  • pause(): boolean
  • en

    Suspends a task.

    zh

    暂停任务

    Returns boolean

    Result of suspending a task.

resume

  • resume(): boolean
  • en

    Resumes a task.

    zh

    继续任务

    Returns boolean

    Result of continuing a task.

Static callStaticMethod

  • callStaticMethod(...args: (number | boolean | string)[]): any
  • Parameters

    • Rest ...args: (number | boolean | string)[]

    Returns any

Generated using TypeDoc