Class Resolver

java.lang.Object
com.qiniu.android.dns.local.Resolver
All Implemented Interfaces:
IResolver

public final class Resolver
extends java.lang.Object
implements IResolver
Created by bailong on 15/6/16.
  • Field Summary

    Fields inherited from interface com.qiniu.android.dns.IResolver

    DNS_DEFAULT_TIMEOUT
  • Constructor Summary

    Constructors 
    Constructor Description
    Resolver​(java.net.InetAddress address)  
    Resolver​(java.net.InetAddress address, int timeout)  
  • Method Summary

    Modifier and Type Method Description
    Record[] resolve​(Domain domain, NetworkInfo info)
    根据域名参数进行查询

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Resolver

      public Resolver​(java.net.InetAddress address)
    • Resolver

      public Resolver​(java.net.InetAddress address, int timeout)
  • Method Details

    • resolve

      public Record[] resolve​(Domain domain, NetworkInfo info) throws java.io.IOException
      Description copied from interface: IResolver
      根据域名参数进行查询
      Specified by:
      resolve in interface IResolver
      Parameters:
      domain - 域名参数
      info - 网络信息,便于根据运营商选择不同策略
      Returns:
      dns记录列表
      Throws:
      java.io.IOException - 劫持或者网络异常