org.jivesoftware.smack.util.DNSUtil Java Examples

The following examples show how to use org.jivesoftware.smack.util.DNSUtil. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RemoteXmppTcpConnectionEndpoints.java    From Smack with Apache License 2.0 5 votes vote down vote up
private static DNSResolver getDnsResolverOrThrow() {
    final DNSResolver dnsResolver = DNSUtil.getDNSResolver();
    if (dnsResolver == null) {
        throw new IllegalStateException("No DNS resolver configured in Smack");
    }
    return dnsResolver;
}
 
Example #2
Source File: DNSJavaResolver.java    From Smack with Apache License 2.0 4 votes vote down vote up
public static void setup() {
    DNSUtil.setDNSResolver(getInstance());
}
 
Example #3
Source File: JavaxResolver.java    From Smack with Apache License 2.0 4 votes vote down vote up
public static void setup() {
    DNSUtil.setDNSResolver(getInstance());
}
 
Example #4
Source File: MiniDnsResolver.java    From Smack with Apache License 2.0 4 votes vote down vote up
public static void setup() {
    DNSUtil.setDNSResolver(getInstance());
}
 
Example #5
Source File: MiniDnsDane.java    From Smack with Apache License 2.0 4 votes vote down vote up
public static void setup() {
    DNSUtil.setDaneProvider(INSTANCE);
}
 
Example #6
Source File: ConnectionConfiguration.java    From AndroidPNClient with Apache License 2.0 3 votes vote down vote up
/**
  * Creates a new ConnectionConfiguration for the specified service name.
  * A DNS SRV lookup will be performed to find out the actual host address
  * and port to use for the connection.
  *
  * @param serviceName the name of the service provided by an XMPP server.
  */
 public ConnectionConfiguration(String serviceName) {
     // Perform DNS lookup to get host and port to use
     DNSUtil.HostAddress address = DNSUtil.resolveXMPPDomain(serviceName);
     init(address.getHost(), address.getPort(), serviceName, 
ProxyInfo.forDefaultProxy());
 }
 
Example #7
Source File: ConnectionConfiguration.java    From AndroidPNClient with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new ConnectionConfiguration for the specified service name 
 * with specified proxy.
 * A DNS SRV lookup will be performed to find out the actual host address
 * and port to use for the connection.
 *
 * @param serviceName the name of the service provided by an XMPP server.
 * @param proxy the proxy through which XMPP is to be connected
 */
public ConnectionConfiguration(String serviceName,ProxyInfo proxy) {
    // Perform DNS lookup to get host and port to use
    DNSUtil.HostAddress address = DNSUtil.resolveXMPPDomain(serviceName);
    init(address.getHost(), address.getPort(), serviceName, proxy);
}