if (link == loopbackLink) MessageUtils.setMessageTypeToLocal (msg);
MessageUtils.setLocalMessage(msg, (link == loopbackLink));
  private DestinationLink linkChoice (DestinationLink link, AttributedMessage msg)  {    if (debug) log.debug ("Link choice: " +(link != null? getName(link) : "null")+                           " for " +MessageUtils.toString(msg));    if (link != null)    {      MessageUtils.setSendProtocolLink (msg, getName(link));      Ack ack = MessageUtils.getAck (msg);      if (ack != null) ack.setSendLink (getName (link));      // if (showTraffic) showProgress (link);      //  Shout out some link selection activity for assessment purposes      if (MessageUtils.isRegularMessage (msg))      {        String targetNode = MessageUtils.getToAgentNode (msg);        DestinationLink lastLink = getLastLinkSelection (targetNode);        if (lastLink != null)        {          String lastLinkName = getName (lastLink);          String thisLinkName = getName (link);          if (!lastLinkName.equals (thisLinkName))          {/* //102            CougaarEvent.postComponentEvent             (              CougaarEventType.STATUS, MessageUtils.getOriginatorAgent(msg).toString(), this.toString(),              "Switch from " +lastLinkName+ " to " +thisLinkName+ " for messages from " +thisNode+              " to " +targetNode            );*/ //102            ServiceBroker sb = getServiceBroker();            //102            EventService es =                                 //102              (EventService)sb.getService(this,               //102                                          EventService.class, //102                                          null);              //102            if (es.isEventEnabled())                          //102              es.event("Switch from " +lastLinkName+          //102                       " to " +thisLinkName+                  //102                       " for messages from " +thisNode+       //102                       " to " +targetNode);                   //102          }        }      }      //  Insure newly local msgs (msgs to formerly remote agents that have now moved to our node)      //  have the correct msg type designation.      if (link == loopbackLink) MessageUtils.setMessageTypeToLocal (msg);      //  Remember selected links      recordLinkSelection (link, msg);    }    return link;  }