public interface TelURL extends URI
tel
URLs as defined by RFC 3966. Tel URLs
represent telephone numbers. SIP servlet containers may be able to
route requests based on tel URLs but are not required to.Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Compares the given TelURL with this TelURL.
|
String |
getPhoneContext()
Returns the phone context of this
TelURL for local numbers or
null if the phone number is global |
String |
getPhoneNumber()
Returns the phone number of this
TelURL . |
boolean |
isGlobal()
Returns true if this
TelURL is global, and false
otherwise. |
void |
setPhoneNumber(String number)
Sets the (global) phone number of this
TelURL . |
void |
setPhoneNumber(String number,
String phoneContext)
Sets the (local) phone number of this
TelURL . |
String |
toString()
Returns the
String representation of this
TelURL . |
clone, getParameter, getParameterNames, getParameterNameSet, getScheme, isSipURI, removeParameter, setParameter
String getPhoneNumber()
TelURL
. The
returned string includes any visual separators present in the
phone number part of the URL but does not include a
leading "+" for global tel URLs.TelURL
String getPhoneContext()
TelURL
for local numbers or
null
if the phone number is globalTelURL
for local numbers or
null
if the phone number is globalvoid setPhoneNumber(String number)
TelURL
. The specified
number must be a valid global number for the "tel" scheme as
described in RFC3966 (URLs for Telephone Calls).
The following usage of this method will result in valid global phone number: setPhoneNumber("+1-201-555-0123")
number
- the new global phone numberIllegalArgumentException
- if the phone number was invalid according
to validation rules specified in RFC3966void setPhoneNumber(String number, String phoneContext)
TelURL
. The specified number
must be a local phone number for the "tel" scheme as
described in RFC3966 (URLs for Telephone Calls).
The following usage of this method will result in a valid local phone number: setPhoneNumber("7042","example.com")
number
- the new local phone numberphoneContext
- the phone-context parameter of this TelURIIllegalArgumentException
- if the phone number was invalid according
to validation rules specified in RFC3966boolean isGlobal()
TelURL
is global, and false
otherwise.String toString()
String
representation of this
TelURL
. Any reserved characters will be properly escaped
according to RFC2396.boolean equals(Object o)
Copyright © 1996-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.