FileUploadTask Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. device. fileupload. FileUploadTask
- com.
Implements
public final class FileUploadTask
implements java.lang.Runnable
Provide means to asynchronous upload file in the Azure Storage using the IoTHub.
The file upload process is composed by 3 steps represented in the follow diagram. +--------------+ +---------------+ +---------------+ +---------------+ | Device | | Iot Hub | | Storage | | Service | +--------------+ +---------------+ +---------------+ +---------------+ | | | | | | | | REQUEST_BLOB | | | +--- request blob --->| | | |<-- blob SAS token --+ | | | | | | UPLOAD_FILE | | | +---- upload file to the provided blob --->| | +<------ end of upload with `status` ------+ | | | | | NOTIFY_IOTHUB | | | +--- notify status -->| | | | +------ notify new file available ------->| | | | |
Constructor Summary
| Constructor | Description | |
|---|---|---|
| FileUploadTask(HttpsTransportManager httpsTransportManager) | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| void | close() |
|
File |
getFileUploadSasUri(FileUploadSasUriRequest request) |
| void | run() |
|
Iot |
sendNotification(FileUploadCompletionNotification fileUploadStatusParser) |
Methods inherited from java.lang.Object
Constructor Details
FileUploadTask
public FileUploadTask(HttpsTransportManager httpsTransportManager)
Parameters:
Method Details
close
public void close()
getFileUploadSasUri
public FileUploadSasUriResponse getFileUploadSasUri(FileUploadSasUriRequest request)
Parameters:
Throws:
run
public void run()
sendNotification
public IotHubStatusCode sendNotification(FileUploadCompletionNotification fileUploadStatusParser)
Parameters:
Throws: