Class CliJoin

java.lang.Object
org.libxmq.imp.CliJoin

public final class CliJoin extends Object
Join the command line arguments into a single line that is parsed with the xmq command line grammar xmqcli.ixml. This must be identical to the C function xmq_cli_join_argv in src/main/c/xmq-cli-join.h. The line starts with xmq, then every argument follows separated by a single space. An argument that is empty or contains whitespace, a quote, a double quote or a backslash is written inside double quotes, where " and \ are escaped with a backslash. For an option with a value, --name=value, only the value is quoted (an empty value is not quoted).
  • Method Details

    • join

      public static String join(String[] args)
      Join the arguments (without the program name) into a command line.
      Parameters:
      args - The arguments, ie argv[1..].
      Returns:
      The command line, starting with xmq.
    • main

      public static void main(String[] args)
      Print the joined command line, used by the tests.
      Parameters:
      args - The arguments to join.