DirectMethodResponse Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. device. twin. DirectMethodResponse
- com.
public class DirectMethodResponse
Constructor Summary
Constructor | Description |
---|---|
DirectMethodResponse(int status, Object payload) |
Constructor for a DirectMethodResponse. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Object | getPayload() |
int | getStatus() |
void | setPayload(Object payload) |
void | setStatus(int status) |
Constructor Details
DirectMethodResponse
public DirectMethodResponse(int status, Object payload)
Constructor for a DirectMethodResponse.
Parameters:
status
- the status in DirectMethodResponse which is returned by the device
payload
- the payload attached to that method. This parameter can be Null: the DirectMethodResponse object will not include the "payload" field Primitive type (e.g., String, Int)/Array/List/Map/custom type: will be serialized as value of the "payload" field using GSON.
Method Details
getPayload
public Object getPayload()
getStatus
public int getStatus()
setPayload
public void setPayload(Object payload)
Parameters:
payload
setStatus
public void setStatus(int status)
Parameters:
status
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure SDK for Java