Package org.jivesoftware.smack.tcp.rce
Class RemoteXmppTcpConnectionEndpoints
java.lang.Object
org.jivesoftware.smack.tcp.rce.RemoteXmppTcpConnectionEndpoints
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlookup
(ConnectionConfiguration config) Lookups remote connection endpoints on the server for XMPP connections over TCP taking A, AAAA and SRV resource records into account.resolveXmppServerDomain
(DnsName domain, List<RemoteConnectionEndpointLookupFailure> lookupFailures, ConnectionConfiguration.DnssecMode dnssecMode) Returns a list of HostAddresses under which the specified XMPP server can be reached at for server-to-server communication.resolveXmppServiceDomain
(DnsName domain, List<RemoteConnectionEndpointLookupFailure> lookupFailures, ConnectionConfiguration.DnssecMode dnssecMode) Returns a list of HostAddresses under which the specified XMPP server can be reached at for client-to-server communication.
-
Field Details
-
XMPP_CLIENT_DNS_SRV_PREFIX
- See Also:
-
XMPP_SERVER_DNS_SRV_PREFIX
- See Also:
-
-
Constructor Details
-
RemoteXmppTcpConnectionEndpoints
public RemoteXmppTcpConnectionEndpoints()
-
-
Method Details
-
lookup
public static RemoteXmppTcpConnectionEndpoints.Result<Rfc6120TcpRemoteConnectionEndpoint> lookup(ConnectionConfiguration config) Lookups remote connection endpoints on the server for XMPP connections over TCP taking A, AAAA and SRV resource records into account. If no host address was configured and all lookups failed, for example with NX_DOMAIN, then result will be populated with the empty list.- Parameters:
config
- the connection configuration to lookup the endpoints for.- Returns:
- a lookup result.
-
resolveXmppServiceDomain
public static List<Rfc6120TcpRemoteConnectionEndpoint> resolveXmppServiceDomain(DnsName domain, List<RemoteConnectionEndpointLookupFailure> lookupFailures, ConnectionConfiguration.DnssecMode dnssecMode) Returns a list of HostAddresses under which the specified XMPP server can be reached at for client-to-server communication. A DNS lookup for a SRV record in the form "_xmpp-client._tcp.example.com" is attempted, according to section 3.2.1 of RFC 6120. If that lookup fails, it's assumed that the XMPP server lives at the host resolved by a DNS lookup at the specified domain on the default port of 5222.As an example, a lookup for "example.com" may return "im.example.com:5269".
- Parameters:
domain
- the domain.lookupFailures
- on optional list that will be populated with host addresses that failed to resolve.dnssecMode
- DNSSec mode.- Returns:
- List of HostAddress, which encompasses the hostname and port that the XMPP server can be reached at for the specified domain.
-
resolveXmppServerDomain
public static List<Rfc6120TcpRemoteConnectionEndpoint> resolveXmppServerDomain(DnsName domain, List<RemoteConnectionEndpointLookupFailure> lookupFailures, ConnectionConfiguration.DnssecMode dnssecMode) Returns a list of HostAddresses under which the specified XMPP server can be reached at for server-to-server communication. A DNS lookup for a SRV record in the form "_xmpp-server._tcp.example.com" is attempted, according to section 3.2.1 of RFC 6120. If that lookup fails , it's assumed that the XMPP server lives at the host resolved by a DNS lookup at the specified domain on the default port of 5269.As an example, a lookup for "example.com" may return "im.example.com:5269".
- Parameters:
domain
- the domain.lookupFailures
- a list that will be populated with host addresses that failed to resolve.dnssecMode
- DNSSec mode.- Returns:
- List of HostAddress, which encompasses the hostname and port that the XMPP server can be reached at for the specified domain.
-