/** * get the parameter (do a name lookup) and return null if none exists. * @param parmname Name of the parameter to get. * @return Parameter of the given name (null if none exists). */ public Object getParm(String parmname) { Object obj = uriParms.getValue(parmname); return obj; }
/** * get the realm value. * @return String. */ public String getRealm() { return (String) authParams.getValue(REALM); }
/** * Get the urse parameter. * @return User parameter (user= phone or user=ip). */ public String getUserType() { return (String) uriParms.getValue(USER); }
/** * Boolean to check if a parameter of a given name exists. * @param name Name of the parameter to check on. * @return a boolean indicating whether the parameter exists. */ public boolean hasParameter(String name) { return uriParms.getValue(name) != null; }
/** * Return the parameter as an object (dont convert to string). * * @param name is the name of the parameter to get. * @return the object associated with the name. */ public Object getParameterValue(String name) { return this.parameters.getValue(name); }
/** * get the URI field * @return String */ public String getURI() { return (String) authParams.getValue(URI); }
/** * get the Opaque field * @return String */ public String getOpaque() { return (String) authParams.getValue(OPAQUE); }
/** * get QOP value * @return String */ public String getQOP() { return (String) authParams.getValue(QOP); }
/** * get the State value. * @return String */ public String getStale() { return (String) authParams.getValue(STALE); }
/** * get the Signature value. * @return String */ public String getSignature() { return (String) authParams.getValue(SIGNATURE); }
/** * get the signedBy value. * @return String */ public String getSignedBy() { return (String) authParams.getValue(SIGNED_BY); }
/** get the PostDial field * @return String */ public String getPostDial() { return (String) parameters.getValue(POSTDIAL); }
/** * Get the isdn subaddress for this number. * @return String */ public String getIsdnSubaddress() { return (String) parameters.getValue(ISUB); }
/** * get the Response value. * @return String */ public String getResponse() { return (String) authParams.getValue(RESPONSE); }
/** * get the specified parameter * @param name String to set * @return String to set */ public String getParameter(String name) { return (String) authParams.getValue(name); }
/** Returns the value of the "transport" parameter, or null if this is not * set. This is equivalent to getParameter("transport"). * * @return the transport paramter of the SipURI */ public String getTransportParam() { if (uriParms != null) { return (String) uriParms.getValue(TRANSPORT); } else return null; }
/** * Sets the <code>gr</code> parameter. * * Not part on the interface since gruu is not part of the base RFC3261. */ public String getGrParam() { return (String) this.uriParms.getValue(GRUU); // JvB: fixed to not add duplicates }
/** * Do a lookup on a given name and return value associated with it. */ public Object getValue(String name) { return getValue(name, true); }
/** Returns the value of the "ttl" parameter, or -1 if this is not set. * This method is equivalent to getParameter("ttl"). * * @return the value of the <code>ttl</code> parameter */ public int getTTLParam() { Integer ttl = (Integer) uriParms.getValue("ttl"); if (ttl != null) return ttl.intValue(); else return -1; }
/** Set the default parameters for this URI. * Do nothing if the parameter is already set to some value. * Otherwise set it to the given value. * @param name Name of the parameter to set. * @param value value of the parameter to set. */ public void setDefaultParm(String name, Object value) { if (uriParms.getValue(name) == null) { NameValue nv = new NameValue(name, value); uriParms.set(nv); } }