String receiveLink = convertSplitLinks (sendLink);
String receiveLink = convertSplitLink (sendLink);
    public MessageAttributes deliverMessage (AttributedMessage msg, MessageAddress dest) throws MisdeliveredMessageException    {      //  RTTs not maintained for local messages      if (MessageUtils.isLocalMessage (msg)) return super.deliverMessage (msg, dest);      //  Record the receive time for the message.  Like with the send time above, kind      //  of a hack, but need BBN support to have link protocols set the receive time      //  at the time a message is actually received.  Again, on the other hand,       //  travel time thru MTS can be considered a legitimate part of the RTT.       long receiveTime = now();      //  Record this latest message reception      String sendNode = MessageUtils.getFromAgentNode (msg);      String sendLink = MessageUtils.getSendProtocolLink (msg);      long sendTime = MessageUtils.getMessageSendTime (msg);      recordLatestMessageReception (sendNode, sendLink, sendTime, receiveTime);           //  Now we turn around and view this received message as completing a      //  round trip from us to the node we got it from (now the destination      //  node).  We take the first half roundtrip times in the message and      //  make real RTTs out of them and store them away.      Vector v = (Vector) msg.getAttribute (RTT_ATTRIBUTE);      if (v != null)      {        String destinationNode = sendNode;        String receiveLink = convertSplitLinks (sendLink);        long secondHalfSendTime = sendTime;        for (Enumeration e=v.elements(); e.hasMoreElements(); )        {          HalfRTT firstHalf = (HalfRTT) e.nextElement();          sendLink = firstHalf.getSendLink();          sendTime = firstHalf.getSendTime();          long firstHalfReceiveTime = firstHalf.getReceiveTime();          long nodeTime = secondHalfSendTime - firstHalfReceiveTime;          int rtt = (int) (receiveTime - (sendTime + nodeTime));          updateRTT (sendLink, destinationNode, receiveLink, rtt, firstHalfReceiveTime, nodeTime);        }      }      //  Send the message on its way      return deliverer.deliverMessage (msg, dest);    }