protected void doTask() throws Exception {
    while (stateCheck(STATECHECK_RUNNING)) {
      try {
        Socket client = server.accept();
        if (null != client) {
          ICShell clientShell = new ICShellSocket(client);

          LineProcessor processor;
          if (null != procNode) {
            processor =
                (ICShell.LineProcessor)
                    ICAppFrame.getComponent(procNode, ICShell.LineProcessor.class);
          } else {
            processor =
                new ICShellCmdProcessor(
                    (ICGenCommand) ICAppFrame.getComponent(APP_COMMANDS, ICGenCommand.class));
          }

          clientShell.setProcessor(processor);
          SocketAddress sa = client.getRemoteSocketAddress();
          clientShell.setName(getName() + " client connected from " + sa);
          clientShell.startShell();
        }
      } catch (SocketException ex) {
        // if the accept failed because stopRequested(), we should not throw exception
        if (stateCheck(STATECHECK_RUNNING)) {
          throw ex;
        }
      }
    }
  }