Module org.newsclub.net.unix.vsock
Package org.newsclub.net.unix.vsock
Class AFVSOCKSelectorProvider
java.lang.Object
java.nio.channels.spi.SelectorProvider
org.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
org.newsclub.net.unix.vsock.AFVSOCKSelectorProvider
public final class AFVSOCKSelectorProvider
extends org.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
Service-provider class for junixsocket selectors and selectable channels.
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.newsclub.net.unix.AFAddressFamily
<@NonNull org.newsclub.net.unix.AFVSOCKSocketAddress> static AFVSOCKSelectorProvider
Returns the singleton instance.protected AFVSOCKSocket
protected <P extends org.newsclub.net.unix.AFSomeSocket>
org.newsclub.net.unix.AFSocketPair<P> newSocketPair
(P s1, P s2) Constructs a new socket pair from two sockets.openDatagramChannel
(ProtocolFamily family) openDatagramChannel
(org.newsclub.net.unix.AFSocketType type) openDatagramChannelPair
(org.newsclub.net.unix.AFSocketType type) protected ProtocolFamily
static AFVSOCKSelectorProvider
provider()
Returns the singleton instance.Methods inherited from class org.newsclub.net.unix.AFSelectorProvider
domainId, openPipe, openSelector, openServerSocketChannel, openSocketChannel
Methods inherited from class java.nio.channels.spi.SelectorProvider
inheritedChannel
-
Method Details
-
getInstance
Returns the singleton instance.- Returns:
- The instance.
-
provider
Returns the singleton instance.- Returns:
- The instance.
-
newSocketPair
protected <P extends org.newsclub.net.unix.AFSomeSocket> org.newsclub.net.unix.AFSocketPair<P> newSocketPair(P s1, P s2) Constructs a new socket pair from two sockets.- Specified by:
newSocketPair
in classorg.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
- Parameters:
s1
- Some socket, the first one.s2
- Some socket, the second one.- Returns:
- The pair.
-
openSocketChannelPair
- Overrides:
openSocketChannelPair
in classorg.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
- Throws:
IOException
-
openDatagramChannelPair
- Overrides:
openDatagramChannelPair
in classorg.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
- Throws:
IOException
-
openDatagramChannelPair
public AFVSOCKSocketPair<AFVSOCKDatagramChannel> openDatagramChannelPair(org.newsclub.net.unix.AFSocketType type) throws IOException - Overrides:
openDatagramChannelPair
in classorg.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
- Throws:
IOException
-
newSocket
- Specified by:
newSocket
in classorg.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
- Throws:
IOException
-
openDatagramChannel
- Specified by:
openDatagramChannel
in classorg.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
- Throws:
IOException
-
openDatagramChannel
public AFVSOCKDatagramChannel openDatagramChannel(org.newsclub.net.unix.AFSocketType type) throws IOException - Specified by:
openDatagramChannel
in classorg.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
- Throws:
IOException
-
openDatagramChannel
- Overrides:
openDatagramChannel
in classorg.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
- Throws:
IOException
-
openServerSocketChannel
- Specified by:
openServerSocketChannel
in classorg.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
- Throws:
IOException
-
openServerSocketChannel
- Specified by:
openServerSocketChannel
in classorg.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
- Throws:
IOException
-
openSocketChannel
- Overrides:
openSocketChannel
in classorg.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
- Throws:
IOException
-
openSocketChannel
- Specified by:
openSocketChannel
in classorg.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
- Throws:
IOException
-
protocolFamily
- Specified by:
protocolFamily
in classorg.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
-
addressFamily
protected org.newsclub.net.unix.AFAddressFamily<@NonNull org.newsclub.net.unix.AFVSOCKSocketAddress> addressFamily()- Specified by:
addressFamily
in classorg.newsclub.net.unix.AFSelectorProvider<org.newsclub.net.unix.AFVSOCKSocketAddress>
-