java.lang.Object
javax.net.SocketFactory
org.newsclub.net.unix.AFSocketFactory<AFVSOCKSocketAddress>
org.newsclub.net.unix.vsock.AFVSOCKSocketFactory
- All Implemented Interfaces:
AFSocketAddressFromHostname<AFVSOCKSocketAddress>
- Direct Known Subclasses:
AFVSOCKSocketFactory.FixedAddress
The base for a SocketFactory that connects to VSOCK sockets.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Always connects sockets to the given VSOCK type and instance.Nested classes/interfaces inherited from class org.newsclub.net.unix.AFSocketFactory
AFSocketFactory.FixedAddressSocketFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected AFVSOCKSocket
configure
(AFVSOCKSocket sock) Performs some optional configuration on a newly created socket.protected final AFVSOCKSocket
Creates a newAFSocket
, connected to the given address.final Socket
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
-
AFVSOCKSocketFactory
protected AFVSOCKSocketFactory()Creates aAFVSOCKSocketFactory
.
-
-
Method Details
-
createSocket
- Specified by:
createSocket
in classAFSocketFactory<AFVSOCKSocketAddress>
- Throws:
SocketException
-
connectTo
Description copied from class:AFSocketFactory
Creates a newAFSocket
, connected to the given address.- Specified by:
connectTo
in classAFSocketFactory<AFVSOCKSocketAddress>
- Parameters:
addr
- The address to connect to.- Returns:
- The socket instance.
- Throws:
IOException
- on error.
-
configure
Performs some optional configuration on a newly created socket.- Parameters:
sock
- The socket.- Returns:
- The very socket.
- Throws:
SocketException
- on error.
-