Interface RemoteCommandProcessor

    • Method Detail

      • parse

        RemoteCommand parse​(String data,
                            MessageCollection errors)
        Instantiates the command from the received data string.
        Parameters:
        data - the data string to parse
        errors - for collecting errors
        Returns:
        the instantiated command, null if failed to parse
      • format

        String format​(Properties header,
                      byte[] payload)
        Turns the command properties and payload into a single string to send.
        Parameters:
        header - the header data
        payload - the payload
        Returns:
        the assembled string
      • read

        RemoteCommand read​(File file,
                           MessageCollection errors)
        Reads a remote command from a file.
        Parameters:
        file - the file to read
        errors - for collecting errors
        Returns:
        the remote command, null if failed to load
      • write

        boolean write​(RemoteCommand cmd,
                      File file,
                      MessageCollection errors)
        Writes a remote command to a file.
        Parameters:
        cmd - the command to write
        file - the file to write to
        errors - for collecting errors
        Returns:
        true if successful