Package org.jivesoftware.smack.tcp.rce
Class RemoteXmppTcpConnectionEndpoints
- java.lang.Object
-
- org.jivesoftware.smack.tcp.rce.RemoteXmppTcpConnectionEndpoints
-
public class RemoteXmppTcpConnectionEndpoints extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RemoteXmppTcpConnectionEndpoints.Result<RCE extends RemoteConnectionEndpoint>
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
XMPP_CLIENT_DNS_SRV_PREFIX
static java.lang.String
XMPP_SERVER_DNS_SRV_PREFIX
-
Constructor Summary
Constructors Constructor Description RemoteXmppTcpConnectionEndpoints()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.static java.util.List<Rfc6120TcpRemoteConnectionEndpoint>
resolveXmppServerDomain(DnsName domain, java.util.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.static java.util.List<Rfc6120TcpRemoteConnectionEndpoint>
resolveXmppServiceDomain(DnsName domain, java.util.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 Detail
-
XMPP_CLIENT_DNS_SRV_PREFIX
public static final java.lang.String XMPP_CLIENT_DNS_SRV_PREFIX
- See Also:
- Constant Field Values
-
XMPP_SERVER_DNS_SRV_PREFIX
public static final java.lang.String XMPP_SERVER_DNS_SRV_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RemoteXmppTcpConnectionEndpoints
public RemoteXmppTcpConnectionEndpoints()
-
-
Method Detail
-
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 java.util.List<Rfc6120TcpRemoteConnectionEndpoint> resolveXmppServiceDomain(DnsName domain, java.util.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 java.util.List<Rfc6120TcpRemoteConnectionEndpoint> resolveXmppServerDomain(DnsName domain, java.util.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.
-
-