private void sendDiscarded(ServiceRegistrar reg,String[] curGroups){
  ServiceID srvcID=reg.getServiceID();
  if (curGroups == null) {
    UnicastResponse resp=(UnicastResponse)registrars.get(srvcID);
    if (resp == null)     return;
    curGroups=resp.getGroups();
  }
  if (registrars.remove(srvcID) != null) {
    regInfo.remove(srvcID);
    if (!listeners.isEmpty()) {
      addNotify((ArrayList)listeners.clone(),mapRegToGroups(reg,curGroups),DISCARDED);
    }
  }
}

private void sendDiscarded ( ServiceRegistrar reg , String [ ] curGroups ) { ServiceID srvcID = reg . getServiceID ( ) ; if ( curGroups == null ) { UnicastResponse resp = ( UnicastResponse ) registrars . get ( srvcID ) ; if ( resp == null ) return ; curGroups = resp . getGroups ( ) ; } if ( registrars . remove ( srvcID ) != null ) { regInfo . remove ( srvcID ) ; if ( ! listeners . isEmpty ( ) ) { addNotify ( ( ArrayList ) listeners . clone ( ) , mapRegToGroups ( reg , curGroups ) , DISCARDED ) ; } } }
convenience method that sends a discarded event containing only one registrar to all registered listeners . this method must be called from within a block that is synchronized on the registrars map .
