Package com.google.common.net

Examples of com.google.common.net.InternetDomainName


   public String apply(Endpoint input) {
      if (input.getRegion() != null)
         return input.getRegion();
      String host = input.getPublicURL().getHost();
      if (InternetDomainName.isValid(host)) {
         InternetDomainName domain = InternetDomainName.from(host);
         return domain.parts().get(0);
      }
      return provider;
   }
View Full Code Here


   @Override
   @SuppressWarnings("unchecked")
   public <R extends HttpRequest> R bindToRequest(R request, Object payload) {
      checkNotNull(payload, "hostprefix");
      checkArgument(isValid(request.getEndpoint().getHost()), "this is only valid for hostnames: " + request);
      InternetDomainName name = from(request.getEndpoint().getHost()).child(payload.toString());
      return (R) request.toBuilder().endpoint(uriBuilder(request.getEndpoint()).host(name.name()).build()).build();
   }
View Full Code Here

   public String apply(Endpoint input) {
      if (input.getRegion() != null)
         return input.getRegion();
      String host = input.getPublicURL().getHost();
      if (InternetDomainName.isValid(host)) {
         InternetDomainName domain = InternetDomainName.from(host);
         return domain.parts().get(0);
      }
      return provider;
   }
View Full Code Here

TOP

Related Classes of com.google.common.net.InternetDomainName

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.