Java 8 Proxy.Type - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 Proxy.Type class.

This code example shows how to use the following methods:ordinal
   public Optional<HostAndPort> getProxy() {
      if (host == null)
         return Optional.absent();
      Integer port = this.port;
      if (port == null) {
         switch (type) {
         case HTTP:
            port = 80;
            break; 
         case SOCKS:
            port = 1080;
            break; 
         default: 
            throw new IllegalArgumentException(type + " not supported");
         } 
      } 
      return Optional.of(HostAndPort.fromParts(host, port));
   } 
 
   @Override 
5
CodeRank
See Code Examples for Java 8 Proxy.Type Methods: