Class AFVSOCKSocketFactory.FixedAddress
java.lang.Object
javax.net.SocketFactory
org.newsclub.net.unix.AFSocketFactory<org.newsclub.net.unix.AFVSOCKSocketAddress>
org.newsclub.net.unix.vsock.AFVSOCKSocketFactory
org.newsclub.net.unix.vsock.AFVSOCKSocketFactory.FixedAddress
- All Implemented Interfaces:
org.newsclub.net.unix.AFSocketAddressFromHostname<org.newsclub.net.unix.AFVSOCKSocketAddress>
- Enclosing class:
AFVSOCKSocketFactory
Always connects sockets to the given VSOCK type and instance.
- Author:
- Christian Kohlschütter
-
Nested Class Summary
Nested classes/interfaces inherited from class AFVSOCKSocketFactory
AFVSOCKSocketFactory.FixedAddressModifier and TypeClassDescriptionstatic final classAlways connects sockets to the given VSOCK type and instance.Nested classes/interfaces inherited from class org.newsclub.net.unix.AFSocketFactory
org.newsclub.net.unix.AFSocketFactory.FixedAddressSocketFactory -
Constructor Summary
ConstructorsConstructorDescriptionFixedAddress(int port, int cid) Creates anAFVSOCKSocketFactorythat always uses the given VSOCK address.FixedAddress(org.newsclub.net.unix.AFVSOCKSocketAddress addr) Creates anAFVSOCKSocketFactorythat always uses the given VSOCK address. -
Method Summary
Modifier and TypeMethodDescriptionorg.newsclub.net.unix.AFVSOCKSocketAddressaddressFromHost(String host, int javaPort) Methods inherited from class AFVSOCKSocketFactory
configure, connectTo, createSocketModifier and TypeMethodDescriptionprotected AFVSOCKSocketconfigure(AFVSOCKSocket sock) Performs some optional configuration on a newly created socket.protected final AFVSOCKSocketconnectTo(org.newsclub.net.unix.AFVSOCKSocketAddress addr) final SocketMethods inherited from class org.newsclub.net.unix.AFSocketFactory
createSocket, createSocket, createSocket, createSocket, isInetAddressSupportedMethods inherited from class SocketFactory
getDefaultMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.newsclub.net.unix.AFSocketAddressFromHostname
isHostnameSupported
-
Constructor Details
-
FixedAddress
Creates anAFVSOCKSocketFactorythat always uses the given VSOCK address.- Parameters:
port- The VSOCK port.cid- The VSOCK CID.- Throws:
SocketException- on internal error.
-
FixedAddress
public FixedAddress(org.newsclub.net.unix.AFVSOCKSocketAddress addr) Creates anAFVSOCKSocketFactorythat always uses the given VSOCK address.- Parameters:
addr- The address.
-
-
Method Details
-
addressFromHost
public org.newsclub.net.unix.AFVSOCKSocketAddress addressFromHost(String host, int javaPort) throws SocketException - Throws:
SocketException
-