@Override public synchronized void acceptInstance(InstanceEvent e){
  m_busy=true;
  if (e.getStatus() == InstanceEvent.FORMAT_AVAILABLE) {
    m_throughput=new StreamThroughput(statusMessagePrefix());
    Instances structure=e.getStructure();
    m_mr=new SubstringReplacerRules(m_matchReplaceDetails,structure,statusMessagePrefix(),m_log,m_env);
    if (!e.m_formatNotificationOnly) {
      if (m_log != null) {
        m_log.statusMessage(statusMessagePrefix() + "Processing stream...");
      }
    }
    m_ie.setStructure(structure);
    m_ie.m_formatNotificationOnly=e.m_formatNotificationOnly;
    notifyInstanceListeners(m_ie);
  }
 else {
    Instance inst=e.getInstance();
    if (inst != null) {
      m_throughput.updateStart();
      m_mr.applyRules(inst);
      m_throughput.updateEnd(m_log);
    }
    m_ie.setInstance(inst);
    m_ie.setStatus(e.getStatus());
    notifyInstanceListeners(m_ie);
    if (e.getStatus() == InstanceEvent.BATCH_FINISHED || inst == null) {
      m_throughput.finished(m_log);
    }
  }
  m_busy=false;
}

@ Override public synchronized void acceptInstance ( InstanceEvent e ) { m_busy = true ; if ( e . getStatus ( ) == InstanceEvent . FORMAT_AVAILABLE ) { m_throughput = new StreamThroughput ( statusMessagePrefix ( ) ) ; Instances structure = e . getStructure ( ) ; m_mr = new SubstringReplacerRules ( m_matchReplaceDetails , structure , statusMessagePrefix ( ) , m_log , m_env ) ; if ( ! e . m_formatNotificationOnly ) { if ( m_log != null ) { m_log . statusMessage ( statusMessagePrefix ( ) + "Processing stream..." ) ; } } m_ie . setStructure ( structure ) ; m_ie . m_formatNotificationOnly = e . m_formatNotificationOnly ; notifyInstanceListeners ( m_ie ) ; } else { Instance inst = e . getInstance ( ) ; if ( inst != null ) { m_throughput . updateStart ( ) ; m_mr . applyRules ( inst ) ; m_throughput . updateEnd ( m_log ) ; } m_ie . setInstance ( inst ) ; m_ie . setStatus ( e . getStatus ( ) ) ; notifyInstanceListeners ( m_ie ) ; if ( e . getStatus ( ) == InstanceEvent . BATCH_FINISHED || inst == null ) { m_throughput . finished ( m_log ) ; } } m_busy = false ; }
accept and process an instance event
