Package it.polito.appeal.traci.protocol

Examples of it.polito.appeal.traci.protocol.RequestMessage


    log.info(resp.content().readStringASCII());
  }
 
  @Test
  public void testCloseHighLevel() throws IOException {
    RequestMessage reqm = new RequestMessage();
    reqm.append(new Command(Constants.CMD_CLOSE));
    reqm.writeTo(outStream);
   
    ResponseMessage respm = new ResponseMessage(inStream);
    assertEquals(1, respm.responses().size());
   
    ResponseContainer pair = respm.responses().get(0);
View Full Code Here


   *
   * @param request
   * @throws IOException
   */
  protected ResponseContainer doQuerySingle(Command request) throws IOException {
    RequestMessage msg = new RequestMessage();
    msg.append(request);
    ResponseMessage resp = doQuery(msg);
    return resp.responses().iterator().next();
  }
View Full Code Here

   * @param request
   * @return the response container for the specified request
   * @throws IOException
   */
  protected ResponseContainer queryAndVerifySingle(Command request) throws IOException {
    RequestMessage msg = new RequestMessage();
    msg.append(request);
    ResponseMessage resp = queryAndVerify(msg);
    return resp.responses().iterator().next();
  }
View Full Code Here

    }
   
    if(queries.isEmpty())
      return;
   
    RequestMessage reqMsg = new RequestMessage();
    for (Query q : queries) {
      for (Command req : q.getRequests()) {
        reqMsg.append(req);
      }
    }
   
    reqMsg.writeTo(dos);
    ResponseMessage respMsg = new ResponseMessage(dis);
    Iterator<ResponseContainer> responseIterator = respMsg.responses().iterator();
    for (Query q : queries) {
      q.pickResponses(responseIterator);     
    }
View Full Code Here

TOP

Related Classes of it.polito.appeal.traci.protocol.RequestMessage

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.