Class AFVSOCKSocketFactory

java.lang.Object
javax.net.SocketFactory
org.newsclub.net.unix.AFSocketFactory<org.newsclub.net.unix.AFVSOCKSocketAddress>
org.newsclub.net.unix.vsock.AFVSOCKSocketFactory
All Implemented Interfaces:
org.newsclub.net.unix.AFSocketAddressFromHostname<org.newsclub.net.unix.AFVSOCKSocketAddress>
Direct Known Subclasses:
AFVSOCKSocketFactory.FixedAddress

public abstract class AFVSOCKSocketFactory extends org.newsclub.net.unix.AFSocketFactory<org.newsclub.net.unix.AFVSOCKSocketAddress>
The base for a SocketFactory that connects to VSOCK sockets.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Always 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

    Constructors
    Modifier
    Constructor
    Description
    protected
  • Method Summary

    Modifier and Type
    Method
    Description
    protected AFVSOCKSocket
    Performs some optional configuration on a newly created socket.
    protected final AFVSOCKSocket
    connectTo(org.newsclub.net.unix.AFVSOCKSocketAddress addr)
     
    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

  • Method Details

    • createSocket

      public final Socket createSocket() throws SocketException
      Specified by:
      createSocket in class org.newsclub.net.unix.AFSocketFactory<org.newsclub.net.unix.AFVSOCKSocketAddress>
      Throws:
      SocketException
    • connectTo

      protected final AFVSOCKSocket connectTo(org.newsclub.net.unix.AFVSOCKSocketAddress addr) throws IOException
      Specified by:
      connectTo in class org.newsclub.net.unix.AFSocketFactory<org.newsclub.net.unix.AFVSOCKSocketAddress>
      Throws:
      IOException
    • configure

      protected AFVSOCKSocket configure(AFVSOCKSocket sock) throws SocketException
      Performs some optional configuration on a newly created socket.
      Parameters:
      sock - The socket.
      Returns:
      The very socket.
      Throws:
      SocketException - on error.