Exemplo n.º 1
0
  /**
   * Module publishes message using InegestManager handle Does not block. The message gets enqueued
   * in the GUI thread and displayed in a widget IngestModule should make an attempt not to publish
   * the same message multiple times. Viewer will attempt to identify duplicate messages and filter
   * them out (slower)
   */
  void postMessage(final IngestMessage message) {

    if (stats != null) {
      // record the error for stats, if stats are running
      if (message.getMessageType() == MessageType.ERROR) {
        stats.addError(message.getSource());
      }
    }
    if (ui != null) {
      ui.displayMessage(message);
    }
  }