|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TelURL
Represents 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.
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o) Compares the given TelURL with this TelURL. |
java.lang.String |
getPhoneContext() Returns the phone context of this TelURL for local numbers or null if the phone number is global |
java.lang.String |
getPhoneNumber() Returns the phone number of this TelURL . |
boolean |
isGlobal() Returns true if this TelURL is global, and false otherwise. |
void |
setPhoneNumber(java.lang.String number) Sets the (global) phone number of this TelURL . |
void |
setPhoneNumber(java.lang.String number, java.lang.String phoneContext) Sets the (local) phone number of this TelURL . |
java.lang.String |
toString() Returns the String representation of this TelURL . |
Methods inherited from interface javax.servlet.sip.URI |
---|
clone, getParameter, getParameterNames, getScheme, isSipURI, removeParameter, setParameter |
Method Detail |
---|
java.lang.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
java.lang.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(java.lang.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 numberjava.lang.IllegalArgumentException
- if the phone number was invalid according to validation rules specified in RFC3966void setPhoneNumber(java.lang.String number, java.lang.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 TelURIjava.lang.IllegalArgumentException
- if the phone number was invalid according to validation rules specified in RFC3966boolean isGlobal()
TelURL
is global, and false otherwise.java.lang.String toString()
String
representation of this TelURL
. Any reserved characters will be properly escaped according to RFC2396.toString
in interface URI
toString
in class java.lang.Object
String
representation of this TelURL
boolean equals(java.lang.Object o)
equals
in interface URI
equals
in class java.lang.Object
o
- the TelURL which is to be compared with this.true
if the two URLs are equal as per RFC 3966.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1996, 2010, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Java SIP Servlet API 1.1 Reference
Part Number E17883-01