Class RemoteXmppTcpConnectionEndpoints


  • public class RemoteXmppTcpConnectionEndpoints
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static RemoteXmppTcpConnectionEndpoints.Result<Rfc6120TcpRemoteConnectionEndpoint> lookup​(org.jivesoftware.smack.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​(org.minidns.dnsname.DnsName domain, java.util.List<org.jivesoftware.smack.util.rce.RemoteConnectionEndpointLookupFailure> lookupFailures, org.jivesoftware.smack.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​(org.minidns.dnsname.DnsName domain, java.util.List<org.jivesoftware.smack.util.rce.RemoteConnectionEndpointLookupFailure> lookupFailures, org.jivesoftware.smack.ConnectionConfiguration.DnssecMode dnssecMode)
      Returns a list of HostAddresses under which the specified XMPP server can be reached at for client-to-server communication.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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​(org.jivesoftware.smack.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​(org.minidns.dnsname.DnsName domain,
                                                                                                  java.util.List<org.jivesoftware.smack.util.rce.RemoteConnectionEndpointLookupFailure> lookupFailures,
                                                                                                  org.jivesoftware.smack.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​(org.minidns.dnsname.DnsName domain,
                                                                                                 java.util.List<org.jivesoftware.smack.util.rce.RemoteConnectionEndpointLookupFailure> lookupFailures,
                                                                                                 org.jivesoftware.smack.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.