java.lang.Object
javax.net.SocketFactory
org.newsclub.net.unix.AFSocketFactory<AFUNIXSocketAddress>
org.newsclub.net.unix.AFUNIXSocketFactory
- All Implemented Interfaces:
AFSocketAddressFromHostname<AFUNIXSocketAddress>
- Direct Known Subclasses:
AFUNIXSocketFactory.FactoryArg
,AFUNIXSocketFactory.SystemProperty
,AFUNIXSocketFactory.URIScheme
The base for a SocketFactory that connects to UNIX sockets.
Typically, the "hostname" is used as a reference to a socketFile on the file system. The actual
mapping is left to the implementor.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A socket factory that handles a custom hostname ("localhost", by default, and configured by the system property "org.newsclub.net.unix.socket.hostname"), forwarding all other requests to the fallbackSocketFactory
.static final class
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
.static final class
A socket factory that handles special host names formatted as file:// URIs.Nested classes/interfaces inherited from class org.newsclub.net.unix.AFSocketFactory
AFSocketFactory.FixedAddressSocketFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected AFUNIXSocket
connectTo
(AFUNIXSocketAddress addr) Creates a newAFSocket
, connected to the given address.Methods inherited from class org.newsclub.net.unix.AFSocketFactory
createSocket, createSocket, createSocket, createSocket, isInetAddressSupported
Methods inherited from class javax.net.SocketFactory
getDefault
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.newsclub.net.unix.AFSocketAddressFromHostname
addressFromHost, isHostnameSupported
-
Constructor Details
-
AFUNIXSocketFactory
protected AFUNIXSocketFactory()Creates aAFUNIXSocketFactory
.
-
-
Method Details
-
createSocket
- Specified by:
createSocket
in classAFSocketFactory<AFUNIXSocketAddress>
- Throws:
SocketException
-
connectTo
Description copied from class:AFSocketFactory
Creates a newAFSocket
, connected to the given address.- Specified by:
connectTo
in classAFSocketFactory<AFUNIXSocketAddress>
- Parameters:
addr
- The address to connect to.- Returns:
- The socket instance.
- Throws:
IOException
- on error.
-