Package org.xbill.DNS

Examples of org.xbill.DNS.ResolverConfig


      hostname = Name.fromString(host, root);
    } catch (TextParseException e) {
      throw new IllegalArgumentException("Invalid hostname '" + host + "'");
    }

    final ResolverConfig currentConfig = ResolverConfig.getCurrentConfig();
    if (currentConfig != null) {
      final Name[] searchPath = currentConfig.searchPath();
      if (searchPath != null) {
        for (Name domain : searchPath) {
          if (hostname.subdomain(domain)) {
            return hostname.relativize(domain).toString();
          }
View Full Code Here


    this.allHosts = allHosts;
    this.searchPath = searchPath;
  }

  static HostResolver create(HeliosClient client) throws InterruptedException, ExecutionException {
    final ResolverConfig currentConfig = ResolverConfig.getCurrentConfig();
    final Name[] path;
    if (currentConfig != null) {
      final Name[] possiblePath = currentConfig.searchPath();
      if (possiblePath != null) {
        path = possiblePath;
      } else {
        path = EMPTY_PATH;
      }
View Full Code Here

      throw new ContainerConnectException(Messages.DnsSdDiscoveryLocator_Container_Already_Connected);
    }
   
    // fall back to the search path as last resort
    if(aTargetID == null || !(aTargetID instanceof DnsSdServiceTypeID)) {
      ResolverConfig config = new ResolverConfig();
      Name[] searchPaths = config.searchPath();
      if(searchPaths != null && searchPaths.length > 0) {
        targetID = new DnsSdServiceTypeID();
        targetID.setSearchPath(searchPaths);
      } else {
        throw new ContainerConnectException(Messages.DnsSdDiscoveryLocator_No_Target_ID);
View Full Code Here

TOP

Related Classes of org.xbill.DNS.ResolverConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.