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
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
Azure SDK for Java