public class SimpleQuitRequest extends SimpleRequest
Request to terminate the server. Only the server administrator is permitted to execute this request.
The request data object is defined as an empty JSON object.
SimpleRequest.Type| Constructor and Description |
|---|
SimpleQuitRequest(java.lang.String identity,
SimpleUser user,
org.json.JSONObject data)
Create a new quit 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 SimpleQuitRequest(java.lang.String identity,
SimpleUser user,
org.json.JSONObject data)
Create a new quit request.
identity - requesting entity identity.user - requesting user. May be null.data - public org.json.JSONObject getData()
getData in class SimpleRequestpublic SimpleRespondMessageContext execute() throws SimpleRequestUserException
SimpleRequestExecutes the operation and returns the response.
execute in class SimpleRequestSimpleRequestUserException - if the request type requires a user
but there is none provided.