code: public void setCommandGenerator (
          String bureauType, final CommandGenerator cmdGenerator, int timeout)
      {
          setLauncher(bureauType, new Launcher() {
              public void launchBureau (String bureauId, String token)
                  throws IOException {
                  ProcessBuilder builder = new ProcessBuilder(
                      cmdGenerator.createCommand(bureauId, token));
                  builder.redirectErrorStream(true);
                  Process process = builder.start();
                  // log the output of the process and prefix with bureau id
                  new BureauLogRedirector(bureauId, process.getInputStream());
              }
  
              @Override
              public String toString () {
                  return "DefaultLauncher for " + cmdGenerator;
              }
          }, timeout);
      }
docs: Registers a command generator for a given type. When an agent is started and no bureaus are
  running, the <code>bureauType</code> is used to determine the <code>CommandGenerator</code>
  instance to call. If the launched bureau does not connect within the given number of
  milliseconds, it will be logged as an error and future attempts to launch the bureau
  will try launching the command again.
  @param bureauType the type of bureau that will be launched
  @param cmdGenerator the generator to be used for bureaus of <code>bureauType</code>
  @param timeout milliseconds to wait for the bureau or 0 to wait forever