Class Command

    • Constructor Detail

      • Command

        public Command​(String node,
                       String sessionId,
                       Command.Action action,
                       List<Object> payloads)
        Creates a command request, which is created by the requester.
        Parameters:
        node - The node.
        sessionId - The session id.
        action - The action. If null, Command.Action.EXECUTE is implied.
        payloads - The payloads.
      • Command

        public Command​(String node,
                       String sessionId,
                       Command.Action action,
                       List<Object> payloads,
                       Locale language,
                       List<Command.Note> notes)
        Creates a command request, which is created by the requester.
        Parameters:
        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.
      • Command

        public 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.
        Parameters:
        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.
      • Command

        public Command​(String node,
                       String sessionId,
                       Command.Status status,
                       Collection<Command.Action> actions,
                       Command.Action defaultAction,
                       List<Object> payloads,
                       Locale language,
                       List<Command.Note> notes)
        Creates a command result, which is created by the responder.
        Parameters:
        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.
    • Method Detail

      • getAction

        public final Command.Action getAction()
        Gets the action, which is used by the requester.
        Returns:
        The action.
      • getStatus

        public final Command.Status getStatus()
        Gets the status of the command.
        Returns:
        The status.
      • getSessionId

        public final String getSessionId()
        Gets the session id.
        Returns:
        The session id.
      • getDefaultAction

        public final Command.Action getDefaultAction()
        Gets the default action or null, if there is no default action.
        Returns:
        The default action.
      • getNotes

        public final List<Command.Note> getNotes()
        Gets the notes.
        Returns:
        The notes.
      • getLanguage

        public final Locale getLanguage()
        Gets the language.
        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.
        Specified by:
        getLanguage in interface LanguageElement
        Returns:
        The language.