Package net.grinder.messages.console

Examples of net.grinder.messages.console.AgentProcessReportMessage


        File base = m_agentConfig.getHome().getDirectory();
        File directory = new File(new File(base, "file-store"), user);
        m_fileStore = new FileStore(directory, m_logger);
      }

      m_sender.send(new AgentProcessReportMessage(ProcessReport.STATE_STARTED, m_fileStore
          .getCacheHighWaterMark()));

      final MessageDispatchSender fileStoreMessageDispatcher = new MessageDispatchSender();
      m_fileStore.registerMessageHandlers(fileStoreMessageDispatcher);

      final MessageDispatchSender messageDispatcher = new MessageDispatchSender();
      m_consoleListener.registerMessageHandlers(messageDispatcher);

      // Everything that the file store doesn't handle is tee'd to the
      // worker processes and our message handlers.
      fileStoreMessageDispatcher.addFallback(new TeeSender(messageDispatcher, new IgnoreShutdownSender(
          m_fanOutStreamSender)));

      m_messagePump = new MessagePump(receiver, fileStoreMessageDispatcher, 1);

      m_reportRunningTask = new TimerTask() {
        public void run() {
          try {
            m_sender.send(new AgentProcessReportMessage(ProcessReport.STATE_RUNNING, m_fileStore
                .getCacheHighWaterMark()));
          } catch (CommunicationException e) {
            cancel();
            m_logger.error("Error while pumping up the AgentProcessReportMessage", e.getMessage());
            m_logger.debug("The error detail is ", e);
View Full Code Here


    public void shutdown() {
      m_reportRunningTask.cancel();

      try {
        m_sender.send(new AgentProcessReportMessage(ProcessReport.STATE_FINISHED, m_fileStore
            .getCacheHighWaterMark()));
        m_logger.debug("Shut down message was sent");
      } catch (CommunicationException e) {
        NoOp.noOp();
      } finally {
View Full Code Here

TOP

Related Classes of net.grinder.messages.console.AgentProcessReportMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.