new StorageDispatcher(device)
The StorageDispatcher queues content for automatic upload to, or download from, the Oracle
Storage Cloud Service.
There can be only one StorageDispatcher instance per DirectlyConnectedDevice at a time and it is
created at first use. To close an instance of a StorageDispatcher the
DirectlyConnectedDevice.close
method must be used.
The onProgress function can be used to set handlers that are used for notifying as the transfer progresses:
storageDispatcher.onProgress = function (progress, error);
where iotcs.device.util.StorageDispatcher.Progress
progress is an object
represents the transfer progress of storage object.
Parameters:
Name | Type | Description |
---|---|---|
device |
iotcs.device.util.DirectlyConnectedDevice | The directly connected device (Messaging API) associated with this storage dispatcher. |
Extends
- iotcs.StorageDispatcher
Classes
Methods
(static) cancel(storageObject)
Cancel the transfer of content to or from storage. This call has no effect if the transfer is
completed, already cancelled, has failed, or the storageObject is not queued.
Parameters:
Name | Type | Description |
---|---|---|
storageObject |
iotcs.StorageObject | The content storageObject to be cancelled. |
(static) queue(storageObject)
Add a StorageObject to the queue to upload/download content to/from the Storage Cloud.
Parameters:
Name | Type | Description |
---|---|---|
storageObject |
iotcs.StorageObject | The content storageObject to be queued. |