/** * Indicates the underlying connector helper is available. * * @return True if the underlying connector helper is available. */ @Override public boolean isAvailable() { return getHelper() != null; }
/** * Returns the actual ephemeral port used when the listening port is set to * '0'. The default value is '-1' if no ephemeral port is known. See * InetSocketAddress#InetSocketAddress(int) and ServerSocket#getLocalPort() * methods for details. * * @return The actual ephemeral port used. */ public int getEphemeralPort() { return (Integer) getHelper().getAttributes().get("ephemeralPort"); }
/** * Returns the actual ephemeral port used when the listening port is set to * '0'. The default value is '-1' if no ephemeral port is known. * * @return The actual ephemeral port used. * @see InetSocketAddress#InetSocketAddress(int) * @see ServerSocket#getLocalPort() */ public int getEphemeralPort() { return (Integer) getHelper().getAttributes().get("ephemeralPort"); }