コード例 #1
0
    public void shutdown() {
      m_reportRunningTask.cancel();

      try {
        m_sender.send(
            new AgentProcessReportMessage(
                ProcessReport.STATE_FINISHED, m_fileStore.getCacheHighWaterMark()));
      } catch (CommunicationException e) {
        // Ignore - peer has probably shut down.
      } finally {
        m_messagePump.shutdown();
      }
    }
コード例 #2
0
 public void start() {
   m_messagePump.start();
   m_timer.schedule(m_reportRunningTask, 1000, 1000);
 }