Class AFSYSTEMSocketFactory
java.lang.Object
javax.net.SocketFactory
org.newsclub.net.unix.AFSocketFactory<AFSYSTEMSocketAddress>
org.newsclub.net.unix.darwin.system.AFSYSTEMSocketFactory
- All Implemented Interfaces:
AFSocketAddressFromHostname<AFSYSTEMSocketAddress>
The base for a SocketFactory that connects to AF_SYSTEM sockets.
-
Nested Class Summary
Nested classes/interfaces inherited from class AFSocketFactory
AFSocketFactory.FixedAddressSocketFactoryModifier and TypeClassDescriptionstatic final classA socket factory that always connects to a fixed socket address, no matter what. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AFSYSTEMSocketconfigure(AFSYSTEMSocket sock) Performs some optional configuration on a newly created socket.protected final AFSYSTEMSocketCreates a newAFSocket, connected to the given address.final SocketMethods inherited from class AFSocketFactory
createSocket, createSocket, createSocket, createSocket, isInetAddressSupportedModifier and TypeMethodDescriptionfinal SocketcreateSocket(String host, int port) final SocketcreateSocket(String host, int port, InetAddress localHost, int localPort) final SocketcreateSocket(InetAddress address, int port) final SocketcreateSocket(InetAddress address, int port, InetAddress localAddress, int localPort) protected final booleanisInetAddressSupported(InetAddress address) Checks whether the givenInetAddressis supported by this socket factory.Methods inherited from class SocketFactory
getDefaultMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AFSocketAddressFromHostname
addressFromHost, isHostnameSupportedModifier and TypeMethodDescriptionaddressFromHost(String host, int port) Translates a "host" string (and port) to anAFSocketAddress.default booleanisHostnameSupported(String host) Checks whether the given hostname is supported by this socket factory.
-
Constructor Details
-
AFSYSTEMSocketFactory
protected AFSYSTEMSocketFactory()Creates aAFSYSTEMSocketFactory.
-
-
Method Details
-
createSocket
- Specified by:
createSocketin classAFSocketFactory<AFSYSTEMSocketAddress>- Throws:
SocketException
-
connectTo
Description copied from class:AFSocketFactoryCreates a newAFSocket, connected to the given address.- Specified by:
connectToin classAFSocketFactory<AFSYSTEMSocketAddress>- 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.
-