Methods Summary |
---|
public java.lang.String | getDisplayName()Returns the display name of SIP address.
return address.getDisplayName();
|
public java.lang.String | getHost()Returns the host part of the SIP address.
return address.getHost();
|
public java.lang.String | getParameter(java.lang.String name)Returns the value associated with the named URI parameter.
return address.getParameter(name);
|
public java.lang.String[] | getParameterNames()Returns a String array of all parameter names.
return address.getParameterNames();
|
public int | getPort()Returns the port number of the SIP address. If port number is
not set, return 5060.
If the address is wildcard "*" return 0.
return address.getPort();
|
public java.lang.String | getScheme()Returns the scheme of SIP address.
return address.getScheme();
|
public java.lang.String | getURI()Returns the URI part of the address (without parameters)
i.e. scheme:user@host:port.
return address.getPlainURI();
|
public java.lang.String | getUser()Returns the user part of SIP address.
return address.getUser();
|
public void | removeParameter(java.lang.String name)Removes the named URI parameter.
URI uri = address.getURI();
if (uri.isSipURI())
((SipURI)uri).removeParameter(name);
// IMPL_NOTE : do something for the tel URL
|
public void | setDisplayName(java.lang.String name)Sets the display name. Empty string "" removes the display name.
address.setDisplayName(name);
|
public void | setHost(java.lang.String host)Sets the host part of the SIP address.
address.setHost(host);
|
public void | setParameter(java.lang.String name, java.lang.String value)Sets the named URI parameter to the specified value. If the
value is null
the parameter is interpreted as a parameter without value.
Existing parameter will be overwritten, otherwise the parameter
is added.
address.setParameter(name, value);
|
public void | setPort(int port)Sets the port number of the SIP address. Valid range is
0-65535, where 0 means that the port number is removed
from the address URI.
if (port < 0 || port > 65535) {
throw new IllegalArgumentException("Invalid port: " + port);
}
URI uri = address.getURI();
if (uri.isSipURI()) {
if (port == 0) {
((SipURI)uri).removePort();
} else {
((SipURI)uri).setPort(port);
}
}
// IMPL_NOTE : do something for the tel URL
|
public void | setScheme(java.lang.String scheme)Sets the scheme of SIP address. Valid scheme format is defined
in RFC 3261 [1] p.224
address.getURI().setScheme(scheme);
|
public void | setURI(java.lang.String URI)Sets the URI part of the SIP address (without parameters)
i.e. scheme:user@host:port. Possible URI parameters are ignored.
address.setURI(URI);
|
public void | setUser(java.lang.String user)Sets the user part of SIP address.
address.setUser(user);
|
public java.lang.String | toString()Returns a fully qualified SIP address, with display name, URI and URI
parameters. If display name is not specified only a SIP URI is returned.
If the port is not explicitly set (to 5060 or other value) it
will be omitted
from the address URI in returned String.
return address.toString();
|