Package net.grinder.messages.console

Examples of net.grinder.messages.console.AgentAddress


   */
  @Override
  public void startAgent(Set<AgentIdentity> agents, GrinderProperties properties) {
    final GrinderProperties propertiesToSend = properties != null ? properties : new GrinderProperties();
    for (AgentIdentity each : agents) {
      m_consoleCommunication.sendToAddressedAgents(new AgentAddress(each), new StartGrinderMessage(
          propertiesToSend, each.getNumber()));
    }
  }
View Full Code Here


   * @see net.grinder.console.communication.AgentProcessControl#stopAgent(net.grinder
   * .common.processidentity.AgentIdentity)
   */
  @Override
  public void stopAgent(AgentIdentity agentIdentity) {
    m_consoleCommunication.sendToAddressedAgents(new AgentAddress(agentIdentity), new StopGrinderMessage());
  }
View Full Code Here

     * Constructor.
     *
     * @param agentIdentity agent identity
     */
    public AgentStatus(AgentIdentity agentIdentity) {
      setAgentProcessStatus(new UnknownAgentProcessReport(new AgentAddress(agentIdentity)));
    }
View Full Code Here

    private final MessagePump m_messagePump;

    public ConsoleCommunication(Connector connector, String user) throws CommunicationException,
        FileStore.FileStoreException {

      final ClientReceiver receiver = ClientReceiver.connect(connector, new AgentAddress(m_agentIdentity));
      m_sender = ClientSender.connect(receiver);
      m_connector = connector;

      if (m_fileStore == null) {
        // Only create the file store if we connected.
View Full Code Here

      logFiles = new File[]{logFiles[0]};
    }
    final byte[] compressedLog = LogCompressUtils.compress(logFiles,
        Charset.defaultCharset(), Charset.forName("UTF-8")
    );
    consoleCommunication.sendMessage(new LogReportGrinderMessage(testId, compressedLog, new AgentAddress(m_agentIdentity)));
    // Delete logs to clean up
    if (!agentConfig.getAgentProperties().getPropertyBoolean(PROP_AGENT_KEEP_LOGS)) {
      LOGGER.info("Clean up the perftest logs");
      FileUtils.deleteQuietly(logFolder);
    }
View Full Code Here

    private final ClientSender m_sender;
    private final TimerTask m_reportRunningTask;
    private final MessagePump m_messagePump;

    public ConsoleCommunication(Connector connector) throws CommunicationException {
      final ClientReceiver receiver = ClientReceiver.connect(connector, new AgentAddress(m_agentIdentity));
      m_sender = ClientSender.connect(receiver);

      m_sender.send(new AgentControllerProcessReportMessage(AgentControllerState.STARTED, getSystemDataModel(),
          m_connectionPort, version));
      final MessageDispatchSender messageDispatcher = new MessageDispatchSender();
View Full Code Here

   * @param agentIdentity     agent controller identity
   */
  public void startAgent(GrinderProperties grinderProperties, AgentIdentity agentIdentity) {
    LOGGER.info("{} agent is started.", agentIdentity);
    final ConsoleCommunicationImplementationEx component = getComponent(ConsoleCommunicationImplementationEx.class);
    final AgentAddress address = new AgentAddress(agentIdentity);
    final String localConnectingAddress = component.getLocalConnectingAddress(address);
    final GrinderProperties prop = (GrinderProperties) grinderProperties.clone();
    prop.setProperty(GrinderProperties.CONSOLE_HOST, localConnectingAddress);
    component.sendToAddressedAgents(address,
        new StartGrinderMessage(prop, agentIdentity.getNumber()));
View Full Code Here

   *
   * @param agentIdentity agent controller identity
   */
  public void stopAgent(AgentIdentity agentIdentity) {
    LOGGER.info("{} agent is stopped.", agentIdentity);
    getComponent(ConsoleCommunication.class).sendToAddressedAgents(new AgentAddress(agentIdentity),
        new StopGrinderMessage());
  }
View Full Code Here

   *
   * @param agentIdentity agentIdentity
   * @param version       version
   */
  public void updateAgent(AgentIdentity agentIdentity, String version) {
    getComponent(ConsoleCommunication.class).sendToAddressedAgents(new AgentAddress(agentIdentity),
        AgentUpdateGrinderMessage.getStartAgentUpdateGrinderMessage(version));
  }
View Full Code Here

TOP

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

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.