public interface DnsResolver
TelURL
or a SipURI
that contains
telephone numbers to SipURIs.
An instance of this interface can be accessed through the ServletContext
parameter named javax.servlet.sip.DnsResolver
or it can be injected
using the @Resource or @Inject annotations.
Modifier and Type | Method and Description |
---|---|
boolean |
resolvesInternally(SipURI uri)
Return true if the SipURI is addressed to the container itself.
|
SipURI |
resolveToSipURI(URI uri)
Resolve a
TelURL or a SipURI with user=phone parameter
to a SIP URI according to the procedures specified in RFC 3824 and RFC 6116. |
List<SipURI> |
resolveToSipURIs(URI uri)
Resolve a
TelURL or a SipURI with user=phone parameter
to SIP URIs according to the procedures specified in RFC 3824 and RFC 6116. |
List<String> |
resolveToStrings(URI uri,
String enumService)
Resolve a
TelURL or a SipURI with user=phone parameter
to URIs according to the procedures specified in RFC 6116 for the
specified enum service. |
String |
toEnum(URI uri)
Get string representation of a
TelURL or a SipURI in ENUM format, per RFC 6116. |
String toEnum(URI uri)
TelURL
or a SipURI
in ENUM format, per RFC 6116.uri
- a TelURL
or SipURI
with a user=phone parameterIllegalArgumentException
- if the uri
is null or does not represent a telephone numberboolean resolvesInternally(SipURI uri)
uri
- An instance of SipURI
.SipURI resolveToSipURI(URI uri) throws IOException
TelURL
or a SipURI
with user=phone parameter
to a SIP URI according to the procedures specified in RFC 3824 and RFC 6116.
Only SIP enumservice ("E2U+SIP") will be used for resolution. If there are
multiple NAPTR records matching the SIP enum service, it returns the SIP URI
with highest precedence by order and preference of NAPTR records.uri
- a TelURL
or SipURI
with a user=phone parameterIOException
- if the DNS resolution fails.IllegalArgumentException
- if the uri
is null or does not represent a telephone numberList<SipURI> resolveToSipURIs(URI uri) throws IOException
TelURL
or a SipURI
with user=phone parameter
to SIP URIs according to the procedures specified in RFC 3824 and RFC 6116.
Only SIP enumservice ("E2U+SIP") will be used for resolution. The returned
Sip URIs are ordered first by order and then by preference of the NAPTR records.uri
- a TelURL
or SipURI
with a user=phone parameterIOException
- if the DNS resolution fails.IllegalArgumentException
- if the uri
is null or does not represent a telephone numberList<String> resolveToStrings(URI uri, String enumService) throws IOException
TelURL
or a SipURI
with user=phone parameter
to URIs according to the procedures specified in RFC 6116 for the
specified enum service. The enum services are listed in RFC 6118.
The returned URIs are ordered first by order and then by preference
of the NAPTR records.uri
- a TelURL
or SipURI
with a user=phone parameterenumService
- Name of the enum service. Eg: "E2U+pres" or "E2U+email"IOException
- if the DNS resolution fails.IllegalArgumentException
- if the uri
is null or does not represent a telephone numberCopyright © 1996-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.