public Object getFieldValue(_Fields field) { switch (field) { case HOST_NAME: return getHostName(); case PORT: return Integer.valueOf(getPort()); case IP_ADDRESS: return getIpAddress(); case SERVER_TYPE: return getServerType(); } throw new IllegalStateException(); }
/** * Creates a new socket that will connect to the given host on the given port. * * @param host * Remote HostAddress including port * @param params * Socket parameters including buffer sizes and keep-alive settings * @param props * the system properties to use and initialize other socket options * like keepalive and buffer sizes */ public GfxdTSocket(HostAddress host, boolean blocking, boolean framedWrites, SocketParameters params, SystemProperties props) throws TTransportException { this(host.resolveHost(), host.getPort(), blocking, framedWrites, params, props, params.getReadTimeout(0)); }
/** * Creates a new SSL socket that will connect to the given host on the given * port. * * @param host * Remote HostAddress including port * @param params * Socket parameters including SSL properties * @param props * the system properties instance to use and initialize global socket * options like keepalive and buffer sizes that are not set in params */ public GfxdTSSLSocket(HostAddress host, SocketParameters params, SystemProperties props) throws TTransportException { this(host.resolveHost(), host.getPort(), params, props, params .getReadTimeout(0)); }
"Got preferred server " + preferredServer + " using control connection to " + this.controlHost + (preferredServer.getPort() <= 0 ? "" : " (trying random " + "server since no preferred server received)")); if (preferredServer.getPort() <= 0) { if (preferredServer.getPort() <= 0) { throw failoverExhausted(failedServers, null);