java.lang.Object
javax.net.SocketFactory
org.newsclub.net.unix.AFSocketFactory<AFUNIXSocketAddress>
org.newsclub.net.unix.AFUNIXSocketFactory
org.newsclub.net.unix.AFUNIXSocketFactory.SystemProperty
- All Implemented Interfaces:
- AFSocketAddressFromHostname<AFUNIXSocketAddress>
- Enclosing class:
- AFUNIXSocketFactory
A socket factory that handles a custom hostname ("junixsocket.localhost", by default, and
 configured by the system property "org.newsclub.net.unix.socket.hostname"),
 forwarding all other requests to the fallback 
SocketFactory.
 The socket path is configured through a system property,
 "org.newsclub.net.unix.socket.default".
 NOTE: While it is technically possible, it is highly discouraged to programmatically change the
 value of the property as it can lead to concurrency issues and undefined behavior.- 
Nested Class SummaryNested classes/interfaces inherited from class org.newsclub.net.unix.AFUNIXSocketFactoryAFUNIXSocketFactory.FactoryArg, AFUNIXSocketFactory.SystemProperty, AFUNIXSocketFactory.URISchemeNested classes/interfaces inherited from class org.newsclub.net.unix.AFSocketFactoryAFSocketFactory.FixedAddressSocketFactory
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddressFromHost(String host, int port) Translates a "host" string (and port) to anAFSocketAddress.final booleanisHostnameSupported(String host) Checks whether the given hostname is supported by this socket factory.Methods inherited from class org.newsclub.net.unix.AFUNIXSocketFactoryconnectTo, createSocketMethods inherited from class org.newsclub.net.unix.AFSocketFactorycreateSocket, createSocket, createSocket, createSocket, isInetAddressSupportedMethods inherited from class javax.net.SocketFactorygetDefault
- 
Constructor Details- 
SystemPropertypublic SystemProperty()Creates aAFUNIXSocketFactory.SystemPropertysocket factory.
 
- 
- 
Method Details- 
addressFromHostDescription copied from interface:AFSocketAddressFromHostnameTranslates 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
 
- 
isHostnameSupportedDescription copied from interface:AFSocketAddressFromHostnameChecks 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.
 
 
-