|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectgov.nist.core.GenericObject
gov.nist.javax.sip.address.NetObject
gov.nist.javax.sip.address.GenericURI
gov.nist.javax.sip.address.SipUri
Implementation of the SipURI interface.
| Field Summary |
| Fields inherited from class gov.nist.javax.sip.address.GenericURI |
ISUB, PHONE_CONTEXT_TAG, POSTDIAL, PROVIDER_TAG, SIP, SIPS, TEL |
| Constructor Summary | |
SipUri()
|
|
| Method Summary | |
void |
clearPassword()
Clear the password from the user part if it exists. |
void |
clearQheaders()
Clear all Qheaders. |
void |
clearUriParms()
clear all URI Parameters. |
Object |
clone()
clone this. |
String |
encode()
Construct a URL from the parsed structure. |
boolean |
equals(Object that)
Compare two URIs and return true if they are equal. |
Authority |
getAuthority()
Get the authority. |
String |
getHeader(String name)
Returns the value of the named header, or null if it is not set. |
Iterator |
getHeaderNames()
Returns an Iterator over the names (Strings) of all headers present in this SipURI. |
String |
getHost()
Get the host protion of the URI. |
gov.nist.core.HostPort |
getHostPort()
Get the host and port of the server. |
String |
getLrParam()
Returns the value of the lr parameter, or null if this
is not set. |
String |
getMAddrParam()
Returns the value of the maddr parameter, or null if this
is not set. |
String |
getMethod()
Get the method parameter. |
String |
getMethodParam()
Returns the value of the method parameter, or null if this
is not set. |
String |
getParameter(String name)
Returns the value of the named parameter, or null if it is not set. |
Iterator |
getParameterNames()
Returns an Iterator over the names (Strings) of all parameters present in this ParametersHeader. |
Object |
getParm(String parmname)
get the parameter (do a name lookup) and return null if none exists. |
int |
getPort()
Get the port from the authority field. |
gov.nist.core.NameValueList |
getQheaders()
Accessor forSIPObjects |
String |
getScheme()
Get the scheme. |
TelephoneNumber |
getTelephoneSubscriber()
Returns the stucture corresponding to the telephone number provided that the user is a telephone subscriber. |
String |
getTransportParam()
Returns the value of the "transport" parameter, or null if this is not set. |
int |
getTTLParam()
Returns the value of the "ttl" parameter, or -1 if this is not set. |
gov.nist.core.NameValueList |
getUriParms()
Accessor for URI parameters |
String |
getUser()
Returns the value of the userParam,
or null if this is not set.
|
String |
getUserAtHost()
getUser@host |
String |
getUserAtHostPort()
getUser@host |
String |
getUserParam()
Returns the user part of this SipURI, or null if it is not set. |
String |
getUserPassword()
Get the password of the user. |
String |
getUserType()
Get the urse parameter. |
boolean |
hasLrParam()
Returns whether the the lr parameter is set. |
boolean |
hasParameter(String name)
Boolean to check if a parameter of a given name exists. |
boolean |
hasTransport()
Return true if the transport parameter is defined. |
boolean |
isSecure()
Returns true if this SipURI is secure i.e. if this SipURI represents a sips URI. |
boolean |
isSipURI()
This method determines if this is a URI with a scheme of "sip" or "sips". |
boolean |
isUserTelephoneSubscriber()
returns true if the user is a telephone subscriber. |
void |
removeHeader(String name)
Remove a header given its name (provided it exists). |
void |
removeHeaders()
Remove all headers. |
void |
removeMAddr()
Remove the maddr param if it exists. |
void |
removeMethod()
remove the Method. |
void |
removeParameter(String name)
Remove a parameter given its name |
void |
removePort()
remove the port setting. |
void |
removeTransport()
Delete the transport string. |
void |
removeTTL()
remove the ttl value from the parameter list if it exists. |
void |
removeUriParms()
Remove the URI parameters. |
void |
removeUser()
Remove the user. |
void |
removeUserType()
Set the user type. |
void |
setAuthority(Authority authority)
Set the authority member |
void |
setDefaultParm(String name,
Object value)
Set the default parameters for this URI. |
void |
setHeader(String name,
String value)
Sets the value of the specified header fields to be included in a request constructed from the URI. |
void |
setHost(gov.nist.core.Host h)
Set the host for this URI. |
void |
setHost(String host)
Set the host portion of the SipURI |
void |
setHostPort(gov.nist.core.HostPort hostPort)
Set the hostPort field of the imbedded authority field. |
void |
setIsdnSubAddress(String isdnSubAddress)
Sets ISDN subaddress of SipURL |
void |
setLrParam()
Sets the value of the lr parameter of this SipURI. |
void |
setMAddr(String mAddr)
Set the MADDR parameter . |
void |
setMAddrParam(String maddr)
Sets the value of the maddr parameter of this SipURI. |
void |
setMethod(String method)
Set the Method |
void |
setMethodParam(String method)
Sets the value of the method parameter. |
void |
setParameter(String name,
String value)
Sets the value of the specified parameter. |
void |
setPort(int p)
set the port to a given value. |
void |
setQHeader(gov.nist.core.NameValue nameValue)
Set the query header when provided as a name-value pair. |
void |
setQheaders(gov.nist.core.NameValueList parms)
Set the qheaders member |
void |
setScheme(String scheme)
Constructor given the scheme. |
void |
setSecure(boolean secure)
Sets the scheme of this URI to sip or sips depending on whether the argument is true or false. |
void |
setTelephoneSubscriber(TelephoneNumber tel)
Set the telephone subscriber field. |
void |
setTransportParam(String transport)
Sets the value of the "transport" parameter. |
void |
setTTLParam(int ttl)
Sets the value of the ttl parameter. |
void |
setUriParameter(gov.nist.core.NameValue nameValue)
Set the parameter as given. |
void |
setUriParm(String name,
Object value)
Set a given URI parameter. |
void |
setUriParms(gov.nist.core.NameValueList parms)
Set the uriParms member |
void |
setUser(String uname)
Sets the user of SipURI. |
void |
setUserParam(String usertype)
Sets the value of the user parameter. |
void |
setUserPassword(String password)
Set the user password. |
String |
toString()
Return a string representation. |
| Methods inherited from class gov.nist.javax.sip.address.GenericURI |
hashCode |
| Methods inherited from class gov.nist.javax.sip.address.NetObject |
debugDump, debugDump, match |
| Methods inherited from class gov.nist.core.GenericObject |
getClassFromName, getMatcher, isMySubclass, makeClone, merge, setMatcher |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SipUri()
| Method Detail |
public void setScheme(String scheme)
public String getScheme()
getScheme in interface URIgetScheme in class GenericURIpublic void clearUriParms()
public void clearPassword()
public Authority getAuthority()
public void clearQheaders()
public boolean equals(Object that)
equals in class GenericURIthat - the object to compare to.
public String encode()
encode in class GenericURIpublic String toString()
toString in interface SipURItoString in class GenericURIpublic String getUserAtHost()
public String getUserAtHostPort()
public Object getParm(String parmname)
parmname - Name of the parameter to get.
public String getMethod()
public gov.nist.core.NameValueList getUriParms()
public void removeUriParms()
public gov.nist.core.NameValueList getQheaders()
public String getUserType()
public String getUserPassword()
getUserPassword in interface SipURIpublic void setUserPassword(String password)
setUserPassword in interface SipURIpassword - - password to set.public TelephoneNumber getTelephoneSubscriber()
public gov.nist.core.HostPort getHostPort()
public int getPort()
getPort in interface SipURIpublic String getHost()
getHost in interface SipURIpublic boolean isUserTelephoneSubscriber()
public void removeTTL()
public void removeMAddr()
public void removeTransport()
public void removeHeader(String name)
name - name of the header to remove.public void removeHeaders()
public void removeUserType()
public void removePort()
removePort in interface SipURIpublic void removeMethod()
public void setUser(String uname)
setUser in interface SipURIuname - The new String value of the user.
ParseException - which signals that an error has been reached
unexpectedly while parsing the user value.public void removeUser()
public void setDefaultParm(String name,
Object value)
name - Name of the parameter to set.value - value of the parameter to set.public void setAuthority(Authority authority)
authority - Authority to set.public void setHost(gov.nist.core.Host h)
h - host to set.public void setUriParms(gov.nist.core.NameValueList parms)
parms - URI parameters to set.
public void setUriParm(String name,
Object value)
name - Name of the parameter to set.value - value of the parameter to set.public void setQheaders(gov.nist.core.NameValueList parms)
parms - query headers to set.public void setMAddr(String mAddr)
mAddr - Host Name to setpublic void setUserParam(String usertype)
setUserParam in interface SipURIusertype - New value String value of the method parameterpublic void setMethod(String method)
method - method parameterpublic void setIsdnSubAddress(String isdnSubAddress)
isdnSubAddress - ISDN subaddresspublic void setTelephoneSubscriber(TelephoneNumber tel)
tel - Telephone subscriber field to set.public void setPort(int p)
setPort in interface SipURIp - Port to set.public boolean hasParameter(String name)
name - Name of the parameter to check on.
public void setQHeader(gov.nist.core.NameValue nameValue)
nameValue - qeuery header provided as a name,value pair.public void setUriParameter(gov.nist.core.NameValue nameValue)
nameValue - - parameter to set.public boolean hasTransport()
public void removeParameter(String name)
removeParameter in interface Parametersname - -- name of the parameter to remove.public void setHostPort(gov.nist.core.HostPort hostPort)
hostPort - is the hostPort to set.public Object clone()
clone in interface URIpublic String getHeader(String name)
getHeader in interface SipURIname - name of header to retrieve
public Iterator getHeaderNames()
getHeaderNames in interface SipURIpublic String getLrParam()
lr parameter, or null if this
is not set. This is equivalent to getParameter("lr").
lr parameterpublic String getMAddrParam()
maddr parameter, or null if this
is not set. This is equivalent to getParameter("maddr").
getMAddrParam in interface SipURImaddr parameterpublic String getMethodParam()
method parameter, or null if this
is not set. This is equivalent to getParameter("method").
getMethodParam in interface SipURImethod parameterpublic String getParameter(String name)
getParameter in interface Parametersname - name of parameter to retrieve
public Iterator getParameterNames()
getParameterNames in interface Parameterspublic int getTTLParam()
getTTLParam in interface SipURIttl parameterpublic String getTransportParam()
getTransportParam in interface SipURIpublic String getUser()
userParam,
or null if this is not set.
This is equivalent to getParameter("user").
getUser in interface SipURIuserParam of the SipURIpublic boolean isSecure()
isSecure in interface SipURItrue if this SipURI represents a sips URI, and
false if it represents a sip URI.public boolean isSipURI()
isSipURI in interface URIisSipURI in class GenericURI
public void setHeader(String name,
String value)
setHeader in interface SipURIname - - a String specifying the header namevalue - - a String specifying the header value
public void setHost(String host)
throws ParseException
setHost in interface SipURIhost - host to set.
ParseException - which signals that an error has been reached
unexpectedly while parsing the host value.public void setLrParam()
lr parameter of this SipURI. The lr
parameter, when present, indicates that the element responsible for
this resource implements the routing mechanisms specified in RFC 3261.
This parameter will be used in the URIs proxies place in the
Record-Route header field values, and may appear in the URIs in a
pre-existing route set.
setLrParam in interface SipURI
public void setMAddrParam(String maddr)
throws ParseException
maddr parameter of this SipURI. The
maddr parameter indicates the server address to be contacted for this
user, overriding any address derived from the host field. This is
equivalent to setParameter("maddr", maddr).
setMAddrParam in interface SipURImaddr - New value of the maddr parameter
ParseException - which signals that an error has been reached
unexpectedly while parsing the mAddr value.
public void setMethodParam(String method)
throws ParseException
method parameter. This specifies
which SIP method to use in requests directed at this URI. This is
equivalent to setParameter("method", method).
setMethodParam in interface SipURImethod - - new value String value of the method parameter
ParseException - which signals that an error has been reached
unexpectedly while parsing the method value.
public void setParameter(String name,
String value)
throws ParseException
setParameter in interface Parametersname - - a String specifying the parameter namevalue - - a String specifying the parameter value
ParseException - which signals that an error has been reached
unexpectedly while parsing the parameter name or value.public void setSecure(boolean secure)
setSecure in interface SipURIsecure - - the boolean value indicating if the SipURI is secure.public void setTTLParam(int ttl)
ttl parameter. The ttl parameter
specifies the time-to-live value when packets are sent using UDP
multicast. This is equivalent to setParameter("ttl", ttl).
setTTLParam in interface SipURIttl - - new value of the ttl parameter
public void setTransportParam(String transport)
throws ParseException
ListeningPoint.
setTransportParam in interface SipURItransport - - new value for the "transport" parameter
ParseException - which signals that an error has been reached
unexpectedly while parsing the transport value.ListeningPointpublic String getUserParam()
getUserParam in interface SipURIpublic boolean hasLrParam()
lr 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.
hasLrParam in interface SipURI
|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||