public class SimpleEchoRequest extends SimpleRequest
Request to echo the request message. The requesting entity identity and user (if any) is also echoed.
The request data object is defined as:
data = {
"#mandatory" : [ "message" ],
"message" : "string"
} where:
message is the message to echo.SimpleRequest.Type| Constructor and Description |
|---|
SimpleEchoRequest(java.lang.String identity,
SimpleUser user,
org.json.JSONObject data)
Create a new echo request.
|
| Modifier and Type | Method and Description |
|---|---|
SimpleRespondMessageContext |
execute()
Executes the operation and returns the response.
|
org.json.JSONObject |
getData() |
getIdentity, getType, getUser, parse, toJSONStringpublic SimpleEchoRequest(java.lang.String identity,
SimpleUser user,
org.json.JSONObject data)
throws SimpleRequestParseException
Create a new echo request.
identity - requesting entity identity.user - requesting user. May be null.data - the request data object.SimpleRequestParseException - if there is an error parsing the
request data.public org.json.JSONObject getData()
getData in class SimpleRequestpublic SimpleRespondMessageContext execute()
SimpleRequestExecutes the operation and returns the response.
execute in class SimpleRequest