Module org.newsclub.net.unix
Package org.newsclub.net.unix
Interface AFSocketAddressFromHostname<A extends AFSocketAddress>
- Type Parameters:
- A- The supported address type.
- All Known Implementing Classes:
- AFSocketFactory,- AFSocketFactory.FixedAddressSocketFactory,- AFSYSTEMSocketFactory,- AFTIPCSocketFactory,- AFTIPCSocketFactory.ServiceAddress,- AFUNIXSocketFactory,- AFUNIXSocketFactory.FactoryArg,- AFUNIXSocketFactory.SystemProperty,- AFUNIXSocketFactory.URIScheme,- AFVSOCKSocketFactory,- AFVSOCKSocketFactory.FixedAddress
public interface AFSocketAddressFromHostname<A extends AFSocketAddress>
Helps converting an internet "hostname" to an 
AFSocketAddress.- Author:
- Christian Kohlschütter
- 
Method SummaryModifier and TypeMethodDescriptionaddressFromHost(String host, int port) Translates a "host" string (and port) to anAFSocketAddress.default booleanisHostnameSupported(String host) Checks whether the given hostname is supported by this socket factory.
- 
Method Details- 
addressFromHostTranslates a "host" string (and port) to anAFSocketAddress.- Parameters:
- host- The hostname
- port- The port, or 0.
- Returns:
- The AFSocketAddress
- Throws:
- SocketException- If there was a problem converting the hostname
- NullPointerException- If host was- null.
 
- 
isHostnameSupportedChecks whether the given hostname is supported by this socket factory. If not, calls to createSocket will cause aSocketException.- Parameters:
- host- The host to check.
- Returns:
- trueif supported.
 
 
-