public final class Command extends Object
<command/> element in the http://jabber.org/protocol/commands namespace.
This class is immutable.
| Modifier and Type | Class and Description |
|---|---|
static class |
Command.Action
Represents a command action.
|
static class |
Command.BadAction
The responding JID cannot accept the specified action.
|
static class |
Command.BadLocale
The responding JID cannot accept the specified language/locale.
|
static class |
Command.BadPayload
The responding JID cannot accept the specified payload (e.g. the data form did not provide one or more required fields).
|
static class |
Command.BadSessionId
The responding JID cannot accept the specified sessionid.
|
static class |
Command.MalformedAction
The responding JID does not understand the specified action.
|
static class |
Command.Note
Represents a note associated with a command.
|
static class |
Command.SessionExpired
The requesting JID specified a sessionid that is no longer active (either because it was completed, canceled, or timed out).
|
static class |
Command.Status
Represents the status of the command.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
NAMESPACE
http://jabber.org/protocol/commands
|
| Constructor and Description |
|---|
Command(String node,
Command.Action action)
Creates a command request for simple execution.
|
Command(String node,
String sessionId,
Command.Action action,
List<Object> payloads)
Creates a command request, which is created by the requester.
|
Command(String node,
String sessionId,
Command.Action action,
List<Object> payloads,
String language,
List<Command.Note> notes)
Creates a command request, which is created by the requester.
|
Command(String node,
String sessionId,
Command.Status status,
Collection<Command.Action> actions,
Command.Action defaultAction,
List<Object> payloads)
Creates a command result, which is created by the responder.
|
Command(String node,
String sessionId,
Command.Status status,
Collection<Command.Action> actions,
Command.Action defaultAction,
List<Object> payloads,
String language,
List<Command.Note> notes)
Creates a command result, which is created by the responder.
|
| Modifier and Type | Method and Description |
|---|---|
Command.Action |
getAction()
Gets the action, which is used by the requester.
|
Collection<Command.Action> |
getActions()
Gets the possible command actions, which are provided by the responder.
|
Command.Action |
getDefaultAction()
Gets the default action or null, if there is no default action.
|
String |
getLanguage()
Gets the language.
|
String |
getNode()
Gets the node.
|
List<Command.Note> |
getNotes()
Gets the notes.
|
List<Object> |
getPayloads()
Gets the command payload.
|
String |
getSessionId()
Gets the session id.
|
Command.Status |
getStatus()
Gets the status of the command.
|
public static final String NAMESPACE
public Command(String node, Command.Action action)
node - The node.action - The action. If null, Command.Action.EXECUTE is implied.public Command(String node, String sessionId, Command.Action action, List<Object> payloads)
node - The node.sessionId - The session id.action - The action. If null, Command.Action.EXECUTE is implied.payloads - The payloads.public Command(String node, String sessionId, Command.Action action, List<Object> payloads, String language, List<Command.Note> notes)
node - The node.sessionId - The session id.action - The action. If null, Command.Action.EXECUTE is implied.payloads - The payloads.language - The language.notes - The notes.public Command(String node, String sessionId, Command.Status status, Collection<Command.Action> actions, Command.Action defaultAction, List<Object> payloads)
node - The node.sessionId - The session id.status - The status.actions - The actions, which are possible to execute by the requester.defaultAction - The default action, which should be executed by the requester.payloads - The payloads.public Command(String node, String sessionId, Command.Status status, Collection<Command.Action> actions, Command.Action defaultAction, List<Object> payloads, String language, List<Command.Note> notes)
node - The node.sessionId - The session id.status - The status.actions - The actions, which are possible to execute by the requester.defaultAction - The default action, which should be executed by the requester.payloads - The payloads.language - The language.notes - The notes.public final List<Object> getPayloads()
public final Command.Action getAction()
public final String getNode()
public final Command.Status getStatus()
public final String getSessionId()
public final Collection<Command.Action> getActions()
public final Command.Action getDefaultAction()
public final List<Command.Note> getNotes()
public final String getLanguage()
The "xml:lang" attribute specifies the language/locale this <command/> is intended for.
This element MAY be specified by the requester to request a specific language/locale, and SHOULD be included by the responder to indicate the language/locale in use.
Copyright © 2014–2015 XMPP.rocks. All rights reserved.