- java.lang.Object
-
- javax.net.SocketFactory
-
- org.newsclub.net.unix.AFUNIXSocketFactory
-
- org.newsclub.net.unix.AFUNIXSocketFactory.SystemProperty
-
- Enclosing class:
- AFUNIXSocketFactory
public static final class AFUNIXSocketFactory.SystemProperty extends 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 fallbackSocketFactory. 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 Summary
-
Nested classes/interfaces inherited from class org.newsclub.net.unix.AFUNIXSocketFactory
AFUNIXSocketFactory.FactoryArg, AFUNIXSocketFactory.SystemProperty, AFUNIXSocketFactory.URIScheme
-
-
Constructor Summary
Constructors Constructor Description SystemProperty()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AFUNIXSocketAddressaddressFromHost(java.lang.String host, int port)Translates a "host" string (and port) to anAFUNIXSocketAddress.-
Methods inherited from class org.newsclub.net.unix.AFUNIXSocketFactory
createSocket, createSocket, createSocket, createSocket, createSocket, isInetAddressSupported
-
-
-
-
Method Detail
-
addressFromHost
protected AFUNIXSocketAddress addressFromHost(java.lang.String host, int port) throws java.io.IOException
Description copied from class:AFUNIXSocketFactoryTranslates a "host" string (and port) to anAFUNIXSocketAddress.- Specified by:
addressFromHostin classAFUNIXSocketFactory- Parameters:
host- The hostnameport- The port, or 0.- Returns:
- The
AFUNIXSocketAddress - Throws:
java.io.IOException- If there was a problem converting the hostname
-
-