DirectMethodResponse Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.device.edge.DirectMethodResponse

public class DirectMethodResponse

Constructor Summary

Constructor Description
DirectMethodResponse(String json)

Method Summary

Modifier and Type Method and Description
<T> T getPayload(Class<T> clazz)

Return the DirectMethodResponse payload in a custom type of your choosing

JsonElement getPayloadAsJsonElement()

Return the DirectMethodResponse payload in JsonElement type

String getPayloadAsJsonString()

Return the DirectMethodResponse payload in json string Use this if you wish to deserialize to a specific type using a deserialization library of your choice

Constructor Details

DirectMethodResponse

public DirectMethodResponse(String json)

Parameters:

json

Method Details

getPayload

public T getPayload(Class clazz)

Return the DirectMethodResponse payload in a custom type of your choosing

Parameters:

clazz - the Custom type into which the payload can be deserialized

Returns:

the DirectMethodResponse payload in Custom type

getPayloadAsJsonElement

public JsonElement getPayloadAsJsonElement()

Return the DirectMethodResponse payload in JsonElement type

Returns:

the DirectMethodResponse payload in JsonElement type

getPayloadAsJsonString

public String getPayloadAsJsonString()

Return the DirectMethodResponse payload in json string Use this if you wish to deserialize to a specific type using a deserialization library of your choice

Returns:

the DirectMethodResponse payload in json string

Applies to