public class DirectMethodRequest
extends java.lang.Object
| Constructor and Description |
|---|
DirectMethodRequest(java.lang.String methodName,
java.lang.Object payload)
Constructor for a DirectMethodRequest.
|
DirectMethodRequest(java.lang.String methodName,
java.lang.Object payload,
java.lang.Integer responseTimeout,
java.lang.Integer connectionTimeout)
Constructor for a DirectMethodRequest.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
toJson()
Return the json representation of this object
|
public DirectMethodRequest(java.lang.String methodName,
java.lang.Object payload)
throws java.lang.IllegalArgumentException
methodName - the method to be invokedpayload - the payload attached to that method. This parameter can be
Null: the DirectMethodRequest 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.java.lang.IllegalArgumentException - if the provided methodName is null or emptypublic DirectMethodRequest(java.lang.String methodName,
java.lang.Object payload,
java.lang.Integer responseTimeout,
java.lang.Integer connectionTimeout)
throws java.lang.IllegalArgumentException
methodName - the method to be invokedpayload - the payload attached to that method. This parameter can be
Null: the DirectMethodRequest 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.responseTimeout - the timeout in seconds for the response to be receivedconnectionTimeout - the timeout in seconds for the connection to be establishedjava.lang.IllegalArgumentException - if the provided methodName is null or emptyCopyright © 2023. All rights reserved.