/** * <p>Get all the Charging Collection Function (CCF) Addresses set in this header</p> * * @return ListIterator that constains all CCF addresses of this header */ public ListIterator getChargingCollectionFunctionAddresses() { Iterator li = this.parameters.iterator(); LinkedList ccfLIST = new LinkedList(); NameValue nv; while (li.hasNext()) { nv = (NameValue) li.next(); if (nv.getName().equalsIgnoreCase(ParameterNamesIms.CCF)) { NameValue ccfNV = new NameValue(); ccfNV.setName(nv.getName()); ccfNV.setValueAsObject(nv.getValueAsObject()); ccfLIST.add(ccfNV); } } return ccfLIST.listIterator(); }
/** * <p>Get all the Event Charging Function (ECF) Addresses set in this header</p> * * @return ListIterator that constains all CCF addresses of this header */ public ListIterator<NameValue> getEventChargingFunctionAddresses() { LinkedList<NameValue> listw = new LinkedList<NameValue>(); Iterator li = this.parameters.iterator(); ListIterator<NameValue> ecfLIST = listw.listIterator(); NameValue nv; boolean removed = false; while (li.hasNext()) { nv = (NameValue) li.next(); if (nv.getName().equalsIgnoreCase(ParameterNamesIms.ECF)) { NameValue ecfNV = new NameValue(); ecfNV.setName(nv.getName()); ecfNV.setValueAsObject(nv.getValueAsObject()); ecfLIST.add(ecfNV); } } return ecfLIST; }
/** * Introduced specifically for the P-Charging-Function-Addresses Header and * all other headers that may have multiple header parameters of the same name, but * with multiple possible values. * * Example: P-Charging-Function-Addresses: ccf=[5555::b99:c88:d77:e66]; ccf=[5555::a55:b44:c33:d22]; * ecf=[5555::1ff:2ee:3dd:4cc]; ecf=[5555::6aa:7bb:8cc:9dd] * @param name of the parameter * @param value of the parameter */ public void setMultiParameter(String name, String value) { NameValue nv = new NameValue(); nv.setName(name); nv.setValue(value); duplicates.set(nv); }
/** Sets the id of this attribute. * @param name the string name/id of the attribute. * @throws SdpException if the name is null */ public void setName(String name) throws SdpException { if (name == null) throw new SdpException("The name is null"); else { NameValue nameValue = getAttribute(); if (nameValue == null) nameValue = new NameValue(); nameValue.setName(name); setAttribute(nameValue); } }