Esempio n. 1
0
  protected Branch addTarget(URI uri) {
    URI target = uri.clone();
    if (target.isSipURI()) {
      SipURI sipUri = (SipURI) target;
      sipUri.removeParameter("method");
      Iterator<String> it = sipUri.getHeaderNames();
      while (it.hasNext()) {
        it.remove();
      }
    }
    if (isInTargetSet(target)) {
      if (LOG.isDebugEnabled()) LOG.debug("target {} is already in target set", target);
      return null;
    } else {
      if (LOG.isDebugEnabled()) LOG.debug("adding target {} to target set", target);

      Branch branch = new Branch(target);
      _targets = LazyList.add(_targets, branch);
      return branch;
    }
  }