code: public String handleCommand(final String command) throws InterruptedException {
          if (lock.tryLock(1, TimeUnit.SECONDS)) {
              try {
                  return doHandleCommand(command);
              } finally {
                  lock.unlock();
              }
          }
          return "'" + command + "' execution is timed out!";
      }
docs: Runs a command on the console. Will not run "exit", "quit", "shutdown", their upper-case
  or mixed case counterparts.
  
  @param command The command to run.
  
  @return either the command is handled, or a console message is returned if the command is not handled.
  
  @throws java.lang.InterruptedException