185186187188189190191192193194195
finished = true; } private void parseRole(String line) { if (reply == null) { reply = new RoleReply(); if (line.startsWith("200")) { reply.setResponseCode(ResponseCode.OK); } else if (line.startsWith("400")) { reply.setResponseCode(ResponseCode.ERROR);
3031323334353637383940
// get the header of client 0 HeaderReply headerReply = agent.getHeader(0); // get the role of this agent RoleReply roleReply = agent.getRole(); // start watching client 0 agent.watch(0); // stop watching client 0