FileUploadNotificationParser Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.service.messaging.serializers.FileUploadNotificationParser

public class FileUploadNotificationParser

Representation of the notification of a single File Upload, with a Json deserializer. Ex of JSON format: { "deviceId":"mydevice", "blobUri":"https://{storage account}.blob.core.windows.net/{container name}/mydevice/myfile.jpg", "blobName":"mydevice/myfile.jpg", "lastUpdatedTime":"2016-06-01T21:22:41+00:00", "blobSizeInBytes":1234, "enqueuedTimeUtc":"2016-06-01T21:22:43.7996883Z" }

Constructor Summary

Constructor Description
FileUploadNotificationParser(String json)

CONSTRUCTOR Create an instance of the FileUploadNotification using the information in the provided json.

Method Summary

Modifier and Type Method and Description
String getBlobName()

Getter for the file name.

Long getBlobSizeInBytesTag()

Getter for the file size.

String getBlobUri()

Getter for the file uri.

String getDeviceId()

Getter for the device identification.

Date getEnqueuedTimeUtc()

Getter for the enqueued time UTC.

Date getLastUpdatedTime()

Getter for the last update time.

Constructor Details

FileUploadNotificationParser

public FileUploadNotificationParser(String json)

CONSTRUCTOR Create an instance of the FileUploadNotification using the information in the provided json.

Parameters:

json - is the string that contains a valid json with the FileUpload notification.

Throws:

IllegalArgumentException - if the json is null, empty, or not valid.

Method Details

getBlobName

public String getBlobName()

Getter for the file name.

Returns:

string with the blob name.

getBlobSizeInBytesTag

public Long getBlobSizeInBytesTag()

Getter for the file size.

Returns:

long with the blob size in bytes.

getBlobUri

public String getBlobUri()

Getter for the file uri.

Returns:

string with the blob URI.

getDeviceId

public String getDeviceId()

Getter for the device identification.

Returns:

string with the device identification.

getEnqueuedTimeUtc

public Date getEnqueuedTimeUtc()

Getter for the enqueued time UTC.

Returns:

string with the enqueued time UTC.

getLastUpdatedTime

public Date getLastUpdatedTime()

Getter for the last update time.

Returns:

string with the last update time.

Applies to