FileUploadTask Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.device.fileupload.FileUploadTask

Implements

java.lang.Runnable

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 ------->| | | | |

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

FileUploadTask

public FileUploadTask(HttpsTransportManager httpsTransportManager)

Parameters:

httpsTransportManager

Method Details

close

public void close()

getFileUploadSasUri

public FileUploadSasUriResponse getFileUploadSasUri(FileUploadSasUriRequest request)

Parameters:

request

Throws:

java.io.IOException

run

public void run()

sendNotification

public IotHubStatusCode sendNotification(FileUploadCompletionNotification fileUploadStatusParser)

Parameters:

fileUploadStatusParser

Throws:

java.io.IOException

Applies to