A class to manage FASP jobs. More...
Public Member Functions | |
virtual FASP_MANAGER_API char const * | LaunchJob (JobOrder *order, Functor *fnctr)=0 |
virtual FASP_MANAGER_API void | ControlJob (mgr_ctrl_t ctrl, UpdateParams *up_prms, char const *jobid)=0 |
virtual FASP_MANAGER_API void | AddSourcePath (char const *jobid, char const *src_path, char const *dst_path, u_int64_t start=0, u_int64_t end=0)=0 |
virtual FASP_MANAGER_API void | CancelJob (char const *jobid)=0 |
virtual FASP_MANAGER_API void | StopPersistentJob (char const *jobid)=0 |
virtual FASP_MANAGER_API void | LockPersistentJob (char const *jobid)=0 |
virtual FASP_MANAGER_API void | RemoveJob (char const *jobid)=0 |
virtual FASP_MANAGER_API void | AddCallback (char const *jobid, Functor *fnctr)=0 |
virtual FASP_MANAGER_API void | AddGlobalCallback (Functor *fnctr)=0 |
virtual FASP_MANAGER_API void | RemoveGlobalCallback (Functor *fnctr)=0 |
virtual FASP_MANAGER_API char const *const * | GetJobIdList ()=0 |
virtual FASP_MANAGER_API JobStats | GetJobStats (char const *jobid)=0 |
virtual FASP_MANAGER_API bool | ListenForServerSessions (bool On)=0 |
virtual FASP_MANAGER_API void | SetDebugLevel (int level)=0 |
Static Public Member Functions | |
static FASP_MANAGER_API Manager * | GetInstance (bool owns_log=true) |
static FASP_MANAGER_API void | Destroy () |
Stops and destructs a singleton reference to a FASP Manager. | |
Protected Member Functions | |
FASP_MANAGER_API | Manager () |
Constructs this FASP Manager. | |
virtual FASP_MANAGER_API | ~Manager () |
Destructs this FASP Manager. | |
A class to manage FASP jobs.
A FASP Manager is responsible for controlling (i.e., launching, pausing, resuming, updating, cancelling) FASP Jobs. The manager is also charged with gathering statistics on each of these jobs. In this context, a FASP Job is a file, directory, or combination thereof to be transferred.
|
pure virtual |
Adds a global callback that gets notified for events on job with the specified id.
Important: (1) never lock inside the callback if there is a possibility that another thread can call another FaspManager API method at that time. (2) don't call another API function inside the callback
jobid | the job id associated with the FASP Job to add a callback |
fnctr | the FASP functor acting as the callback |
JobNotFoundException | on job ids that cannot be mapped to FASP Jobs |
|
pure virtual |
Adds a global callback that gets notified for events on all active transfers
Important: (1) never lock inside the callback if there is a possibility that another thread can call another FaspManager API method at that time. (2) don't call another API function inside the callback
fnctr | the FASP functor acting as the callback |
|
pure virtual |
Adds a source path to a persistent transfer session.
jobid | id of the job to which the source path is to be added |
src_path | the new source path to be added (must be a file if using ranges) |
dst_path | the destination path for the source (must not be a directory) |
start | the start byte of source file. 0 indicates beginning of the file |
end | the end byte of source file. 0 indicates end of the file |
Job_not_found_exception | on job ids that cannot be mapped to FASP Jobs |
fasp_state_exception | on Jobs that are either completed or not persistent |
fasp_send_exception | on errors relating to the sending of management messages |
|
pure virtual |
Cancels a transfer job and aborts the transfer, if still running. Results in SESSION_ERROR notification.
jobid | id of the job to which source path is to be added |
JobNotFoundException | on job ids that cannot be mapped to FASP Jobs |
StateException | on Jobs that are either completed or not persistent |
SendException | on errors relating to the sending of management messages |
|
pure virtual |
Controls a FASP Job. Possible controls are Pause, Resume, and Cancel.
ctrl | the control type |
up_prms | the rate and/or policy change, if applicable |
jobid | the job id associated with the FASP Job to control |
Job_not_found_exception | on job ids that cannot be mapped to FASP Jobs |
fasp_state_exception | on Jobs that cannot be removed in their current state |
fasp_send_exception | on errors relating to the sending of management messages |
|
static |
|
pure virtual |
Gets a list of FASP Jobs. This list comprises a snapshot of the jobs running at the time of this call.
|
pure virtual |
Gets FASP Job job level stats.
jobid | the job id associated with the FASP Job |
JobNotFoundException | on job ids that cannot be mapped to FASP Jobs |
Launches a FASP Job.
order | the transfer definition of the FASP Job |
fnctr | the functor used in statistic notification callbacks, NULL if there is no callback functor to register |
XferException | on transfer related errors |
ValidationException | if paths are not correctly set in the job order |
|
pure virtual |
Once this is turned on, you can use a global callback to receive notifications for sessions intiated outside FaspManager. This feature can be used to monitor transfers on an Aspera server. NOTE: This must be turned on at the time an external transfer is started. Fasp Manager cannot send notifications for transfers already running at the time this feature is turned on.
On | the boolean parameter to enable/disable external session monitoring. |
|
pure virtual |
Locks a persistent transfer job and prevents it from accepting paths further. Once locked, a persistent job will terminate when it completes transferring all paths already submitted to it, just like a regular job.
jobid | id of the job to which source path is to be added |
JobNotFoundException | on job ids that cannot be mapped to FASP Jobs |
StateException | on Jobs that are either completed or not persistent |
SendException | on errors relating to the sending of management messages |
|
pure virtual |
Removes a global callback
fnctr | the FASP functor acting as the callback |
|
pure virtual |
Removes a FASP Job from the FASP Manager.
jobid | the job id associated with the FASP Job to remove |
JobNotFoundException | on job ids that cannot be mapped to FASP Jobs |
StateException | on Jobs that cannot be removed in their current state |
|
pure virtual |
Set the debug logging level for this Fasp Manager
level | the logging level 0 to 2 |
|
pure virtual |
Stops a persistent transfer job and aborts the transfer, if still running. Normally, jobs are automatically terminated once all sources are transferred (or failed). The only exception is Persistent jobs which persist until you invoke this function. This is treated as normal termination of a persistent job and no errors are raised.
jobid | id of the job to which source path is to be added |
JobNotFoundException | on job ids that cannot be mapped to FASP Jobs |
StateException | on Jobs that are either completed or not persistent |
SendException | on errors relating to the sending of management messages |