class ConsoleCommunicationImplementation implements ConsoleCommunication {

  public boolean processOneMessage() {
    while (true) {
      if (m_shutdown.get()) {
        return false;
      }

      if (m_processing.await(true)) {
        try {
          final Message message = m_receiver.waitForMessage();

          if (message == null) {
            // Current receiver has been shut down.
            m_processing.set(false);
          }
          else {
            m_messageDispatcher.send(message);
            return true;
          }
        }
        catch (CommunicationException e) {
          // The receive or send failed. We only set m_processing to false when
          // our receiver has been shut down.
          m_errorHandler.handleException(e);
        }
      }
    }
  }

  public  ConsoleCommunicationImplementation(Resources resources,
			ConsoleProperties properties, ErrorHandler errorHandler,
			TimeAuthority timeAuthority);
  public  ConsoleCommunicationImplementation(Resources resources,
                                            ConsoleProperties properties,
                                            ErrorHandler errorHandler,
                                            TimeAuthority timeAuthority,
                                            long idlePollDelay,
                                            long inactiveClientTimeOut);

}