- java.lang.Object
-
- javax.net.SocketFactory
-
- org.newsclub.net.unix.AFUNIXSocketFactory
-
- org.newsclub.net.unix.AFUNIXSocketFactory.FactoryArg
-
- Enclosing class:
- AFUNIXSocketFactory
public static final class AFUNIXSocketFactory.FactoryArg 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 an argument passed by to the constructor. This is particularly useful for JDBC drivers that take a "socketFactory" and a "socketFactoryArg". The latter will be passed as a constructor argument.
-
-
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 FactoryArg(java.io.File file)FactoryArg(java.lang.String socketPath)
-
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
-
-