if (log.isDebugEnabled()) log.debug("Publishing AgentControl(AddTicket) for mobility: " + ac);
if (log.isDebugEnabled()) { StringBuffer sb = new StringBuffer("AgentControl publication:" + " myUid=" + agentControlUIDs.contains(ac.getOwnerUID()) + " status=" + ac.getStatusCodeAsString()); if (ac.getAbstractTicket() instanceof AddTicket) { AddTicket at = (AddTicket)ac.getAbstractTicket(); sb.append(" agent=" + at.getMobileAgent() + " destNode=" + at.getDestinationNode()); } log.debug(sb.toString()); }
  protected void addAgent(String newAgent, String destNode) {    MessageAddress newAgentAddr = null;    MessageAddress destNodeAddr = null;    if (newAgent != null) {      newAgentAddr = new ClusterIdentifier(newAgent);    }    if (destNode != null) {      destNodeAddr = new MessageAddress(destNode);    }    Object ticketId = mobilityFactory.createTicketIdentifier();    AddTicket addTicket = new AddTicket(ticketId, newAgentAddr, destNodeAddr);    UID acUID = getUIDService().nextUID();    agentControlUIDs.add(acUID);    AgentControl ac =      mobilityFactory.createAgentControl(acUID, destNodeAddr, addTicket);    if (log.isDebugEnabled())      log.debug("Publishing AgentControl(AddTicket) for mobility: " + ac);    bbs.publishAdd(ac);  }