/** Returns whether the the <code>lr</code> parameter is set. This is * equivalent to hasParameter("lr"). This interface has no getLrParam as * RFC3261 does not specify any values for the "lr" paramater. * * @return true if the "lr" parameter is set, false otherwise. */ public boolean hasLrParam() { return uriParms.getNameValue(LR) != null; }
/** Get the name value pair for a given authentication info parameter. * *@param name is the name for which we want to retrieve the name value * list. */ public NameValue getAuthInfo(String name) { return parameters.getNameValue(name); }
/** * This is for the benifit of the TCK. * * @return the name value pair for the given parameter name. */ public NameValue getNameValue(String parameterName) { return parameters.getNameValue(parameterName); }
/** * Returns whether the <code>gr</code> parameter is set. * * Not part on the interface since gruu is not part of the base RFC3261. */ public boolean hasGrParam() { return uriParms.getNameValue(GRUU) != null; }
/** * boolean function * @param name String to set * @return true if this header has the specified parameter, false otherwise. */ public boolean hasParameter(String name) { return authParams.getNameValue(name) != null; }
/** Returns the value of the <code>maddr</code> parameter, or null if this * is not set. This is equivalent to getParameter("maddr"). * * @return the value of the <code>maddr</code> parameter */ public String getMAddrParam() { NameValue maddr = uriParms.getNameValue(MADDR); if (maddr == null) return null; String host = (String) maddr.getValueAsObject(); return host; }
/** * Do a lookup on a given name and return value associated with it. */ public Object getValue(String name, boolean stripQuotes) { NameValue nv = this.getNameValue(name.toLowerCase()); if (nv != null) return nv.getValueAsObject(stripQuotes); else return null; }
public void setParameter(String name, String value) throws ParseException { if (name == null) throw new NullPointerException("null name"); NameValue nv = super.parameters.getNameValue(name.toLowerCase()); if (nv == null) { nv = new NameValue(name, value);
NameValue nv = super.parameters.getNameValue(name.toLowerCase()); if (nv == null) { nv = new NameValue(name, value);
public void setParameter(String name, String value) throws ParseException { if (value == null) throw new NullPointerException("null value"); NameValue nv = super.parameters.getNameValue(name.toLowerCase()); if (nv == null) { nv = new NameValue(name, value); // quoted values if (name.equalsIgnoreCase(ParameterNamesIms.D_VER)) { nv.setQuotedValue(); if (value.startsWith(Separators.DOUBLE_QUOTE)) throw new ParseException(value + " : Unexpected DOUBLE_QUOTE", 0); } super.setParameter(nv); } else { nv.setValueAsObject(value); } }
/** Set a parameter. */ public void setParameter(String name, String value) throws ParseException { NameValue nv = parameters.getNameValue(name); if (nv != null) { nv.setValueAsObject(value); } else { nv = new NameValue(name, value); if (name.equalsIgnoreCase("methods")) nv.setQuotedValue(); this.parameters.set(nv); } }
/** * Sets the value of the specified parameter. If the parameter already had * * a value it will be overwritten. * * @param name - a String specifying the parameter name * * @param value - a boolean specifying the parameter value * * @throws ParseException which signals that an error has been reached * * unexpectedly while parsing the parameter name or value. * */ protected void setParameter(String name, float value) { Float val = Float.valueOf(value); NameValue nv = parameters.getNameValue(name); if (nv != null) { nv.setValueAsObject(val); } else { nv = new NameValue(name, val); this.parameters.set(nv); } }
NameValue nv1 = this.getNameValue(key); NameValue nv2 = (NameValue) other.get(key); if (nv2 == null)
/** * Sets the value of the specified parameter. If the parameter already had * * a value it will be overwritten. A zero-length String indicates flag * * parameter. * * * * @param name - a String specifying the parameter name * * @param value - a String specifying the parameter value * * @throws ParseException which signals that an error has been reached * * unexpectedly while parsing the parameter name or value. * */ public void setParameter(String name, String value) throws ParseException { NameValue nv = parameters.getNameValue(name); if (nv != null) { nv.setValueAsObject(value); } else { nv = new NameValue(name, value); this.parameters.set(nv); } }
/** * Set the MADDR parameter . * @param mAddr Host Name to set */ public void setMAddr(String mAddr) { NameValue nameValue = uriParms.getNameValue(MADDR); Host host = new Host(); host.setAddress(mAddr); if (nameValue != null) nameValue.setValueAsObject(host); else { nameValue = new NameValue(MADDR, host); uriParms.set(nameValue); } }
/** * Sets the value of the specified parameter. If the parameter already had * * a value it will be overwritten. A zero-length String indicates flag * * parameter. * * * * @param name - a String specifying the parameter name * * @param value - a String specifying the parameter value * * @throws ParseException which signals that an error has been reached * * unexpectedly while parsing the parameter name or value. * */ public void setQuotedParameter(String name, String value) throws ParseException { NameValue nv = parameters.getNameValue(name); if (nv != null) { nv.setValueAsObject(value); nv.setQuotedValue(); } else { nv = new NameValue(name, value); nv.setQuotedValue(); this.parameters.set(nv); } }