Package net.grinder.communication

Examples of net.grinder.communication.CommunicationException


   *
   * @param message message to be sent
   */
  public void update(AgentUpdateGrinderMessage message) throws CommunicationException {
    if (message.getOffset() != offset) {
      throw new CommunicationException("Expected " + offset + " offset," +
          " but " + message.getOffset() + " was sent. " + ToStringBuilder.reflectionToString(message));
    }
    try {
      IOUtils.write(message.getBinary(), agentOutputStream);
      offset = message.getNext();
    } catch (IOException e) {
      throw new CommunicationException("Error while writing binary", e);
    }
    if (message.getNext() == 0) {
      IOUtils.closeQuietly(agentOutputStream);
      decompressDownloadPackage();
      // Then just exist to run the agent update process.
View Full Code Here


  public void setAddress(Address address) throws CommunicationException {

    try {
      m_processAddress = (AgentAddress) address;
    } catch (ClassCastException e) {
      throw new CommunicationException("Not an agent process address", e);
    }
  }
View Full Code Here

TOP

Related Classes of net.grinder.communication.CommunicationException

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.