Package java.net

Examples of java.net.UnknownHostException


    private long lastActivity = 0;
    private boolean shouldCloseConnection = false;

    public Connection(InetSocketAddress address) throws IOException {
      if (address.isUnresolved()) {
        throw new UnknownHostException("unknown host: " + address.getHostName());
      }
      this.address = address;
      this.setName("IPC Client connection to " + address.toString());
      this.setDaemon(true);
    }
View Full Code Here


    public Connection(ConnectionId remoteId) throws IOException {
      this.remoteId = remoteId;
      this.server = remoteId.getAddress();
      if (server.isUnresolved()) {
        throw new UnknownHostException("unknown host: " +
                                       remoteId.getAddress().getHostName());
      }
     
      UserGroupInformation ticket = remoteId.getTicket();
      Class<?> protocol = remoteId.getProtocol();
View Full Code Here

      throw bindException;
    } catch (SocketException e) {
      // If they try to bind to a different host's address, give a better
      // error message.
      if ("Unresolved address".equals(e.getMessage())) {
        throw new UnknownHostException("Invalid hostname for server: " +
                                       address.getHostName());
      } else {
        throw e;
      }
    }
View Full Code Here

            return;
        }
        if (address instanceof InetSocketAddress) {
            final InetSocketAddress endpoint = (InetSocketAddress) address;
            if (endpoint.isUnresolved()) {
                throw new UnknownHostException(endpoint.getHostName());
            }
        }
    }
View Full Code Here

      throw new BindException("Problem binding to " + address);
    } catch (SocketException e) {
      // If they try to bind to a different host's address, give a better
      // error message.
      if ("Unresolved address".equals(e.getMessage())) {
        throw new UnknownHostException("Invalid hostname for server: " +
                                       address.getHostName());
      } else {
        throw e;
      }
    }
View Full Code Here

        return ip[1] == ip2[1];
    }

    public String getLocation(InetAddress endpoint) throws UnknownHostException
    {
        throw new UnknownHostException("Not Supported");
    }
View Full Code Here

    /* ------------------------------------------------------------------------------- */
    public HttpDestination getDestination(Address remote, boolean ssl) throws UnknownHostException, IOException
    {
        if (remote==null)
            throw new UnknownHostException("Remote socket address cannot be null.");

        synchronized (_destinations)
        {
            HttpDestination destination=_destinations.get(remote);
            if (destination==null)
View Full Code Here

          log.info("Unable to use port " + port + ", retrying. (Thread Name = " + threadName + ")");
          UtilWaitThread.sleep(250);
        }
      }
    }
    throw new UnknownHostException("Unable to find a listen port");
  }
View Full Code Here

                                found = true;
                                break;
                            }
                        }
                        if ( ! found ) {
                            emit("complete", CallbackResult.createError(new UnknownHostException()));
                        }
                    } catch (UnknownHostException e) {
                        emit("complete", CallbackResult.createError(e));
                    }
                }
View Full Code Here

                                found = true;
                                break;
                            }
                        }
                        if ( ! found ) {
                            emit("complete", CallbackResult.createError(new UnknownHostException()));
                        }
                    } catch (UnknownHostException e) {
                        emit("complete", CallbackResult.createError(e));
                    }
                }
View Full Code Here

TOP

Related Classes of java.net.UnknownHostException

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.