code: @Override
      public void handle(CommandContext ctx, String commandLine) {
  
          if (commandLine.contains("--help")) {
              this.printHelp(commandLine, ctx);
              return;
          }
  
          String[] commands = commandLine.split(" ");
  
          if (commands.length == 1) {
              this.printHistory(ctx);
          } else if (commands.length == 2) {
              String argument = commands[1];
              if ("clear".equals(argument)) {
                  ctx.getHistory().clear();
              } else if ("enable".equals(argument)) {
                  ctx.getHistory().setUseHistory(true);
              } else if ("disable".equals(argument)) {
                  ctx.getHistory().setUseHistory(false);
              } else {
                  ctx.printLine("Invalid command.");
              }
          } else {
              ctx.printLine("Invalid command.");
          }
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.ss7.management.console.CommandHandler#isValid(java.lang .String)