Top Description Fields Constructors Methods
org.newsclub.net.unix

pack-priv final Class AFGenericSelectorProvider

extends AFSelectorProvider<AFGenericSocketAddress>
Class Inheritance
Imports
java.io.IOException, java.net.ProtocolFamily, .SocketAddress, org.eclipse.jdt.annotation.NonNull, com.kohlschutter.annotations.compiletime.SuppressFBWarnings

Service-provider class for junixsocket selectors and selectable channels.

Field Summary

Modifier and TypeField and Description
pack-priv static final AFAddressFamily<@NonNull AFGenericSocketAddress>
private static final AFGenericSelectorProvider

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected AFAddressFamily<@NonNull AFGenericSocketAddress>
addressFamily()

Implements abstract org.newsclub.net.unix.AFSelectorProvider.addressFamily.

Returns the address family supported by this implementation.

public static AFGenericSelectorProvider

Returns:

The instance.
getInstance
()

Returns the singleton instance.

protected AFGenericSocket
newSocket()

Implements abstract org.newsclub.net.unix.AFSelectorProvider.newSocket.

Constructs a new socket.

protected <P extends AFSomeSocket> AFSocketPair<P>

Returns:

The pair.
newSocketPair
(P
Some socket, the first one.
s1
,
P
Some socket, the second one.
s2
)

Implements abstract org.newsclub.net.unix.AFSelectorProvider.newSocketPair.

Constructs a new socket pair from two sockets.

public AFGenericDatagramChannel
public AFGenericDatagramChannel
openDatagramChannel(AFSocketType
The socket type.
type
)

Implements abstract org.newsclub.net.unix.AFSelectorProvider.openDatagramChannel.

Opens a DatagramChannel using the given socket type.

public AFGenericDatagramChannel
openDatagramChannel(ProtocolFamily
The protocol family
family
)

Overrides org.newsclub.net.unix.AFSelectorProvider.openDatagramChannel.

Opens a datagram channel.

public AFGenericSocketPair<AFGenericDatagramChannel>
openDatagramChannelPair()

Overrides org.newsclub.net.unix.AFSelectorProvider.openDatagramChannelPair.

Opens a socket pair of interconnected datagram channels.

public AFGenericSocketPair<AFGenericDatagramChannel>
openDatagramChannelPair(AFSocketType
The socket type.
type
)

Overrides org.newsclub.net.unix.AFSelectorProvider.openDatagramChannelPair.

Opens a socket pair of interconnected DatagramChannels, using the given AFSocketType.

public AFGenericServerSocketChannel
public AFGenericServerSocketChannel
openServerSocketChannel(SocketAddress
The socket address to bind on.
sa
)

Implements abstract org.newsclub.net.unix.AFSelectorProvider.openServerSocketChannel.

Opens a server-socket channel bound on the given SocketAddress.

public AFGenericSocketChannel
public AFGenericSocketChannel
openSocketChannel(SocketAddress
The socket address to connect to.
sa
)

Implements abstract org.newsclub.net.unix.AFSelectorProvider.openSocketChannel.

Opens a socket channel connected to the given SocketAddress.

public AFGenericSocketPair<AFGenericSocketChannel>
openSocketChannelPair()

Overrides org.newsclub.net.unix.AFSelectorProvider.openSocketChannelPair.

Opens a socket pair of interconnected channels.

protected ProtocolFamily
protocolFamily()

Implements abstract org.newsclub.net.unix.AFSelectorProvider.protocolFamily.

Returns the protocol family supported by this implementation.

public static AFGenericSelectorProvider

Returns:

The instance.
provider
()

Hides org.newsclub.net.unix.AFSelectorProvider.provider.

Returns the singleton instance.

Inherited from org.newsclub.net.unix.AFSelectorProvider:
domainIdopenPipeopenSelectablePipeopenSelectoropenServerSocketChannelopenSocketChannel

Field Detail

AF_GENERICback to summary
pack-priv static final AFAddressFamily<@NonNull AFGenericSocketAddress> AF_GENERIC
Annotations
@SuppressWarnings:null
INSTANCEback to summary
private static final AFGenericSelectorProvider INSTANCE

Constructor Detail

AFGenericSelectorProviderback to summary
private AFGenericSelectorProvider()

Method Detail

addressFamilyback to summary
protected AFAddressFamily<@NonNull AFGenericSocketAddress> addressFamily()

Implements abstract org.newsclub.net.unix.AFSelectorProvider.addressFamily.

Doc from org.newsclub.net.unix.AFSelectorProvider.addressFamily.

Returns the address family supported by this implementation.

Returns:AFAddressFamily<@NonNull AFGenericSocketAddress>

The address family.

Annotations
@Override
getInstanceback to summary
public static AFGenericSelectorProvider getInstance()

Returns the singleton instance.

Returns:AFGenericSelectorProvider

The instance.

Annotations
@SuppressFBWarnings:MS_EXPOSE_REP
newSocketback to summary
protected AFGenericSocket newSocket() throws IOException

Implements abstract org.newsclub.net.unix.AFSelectorProvider.newSocket.

Doc from org.newsclub.net.unix.AFSelectorProvider.newSocket.

Constructs a new socket.

Returns:AFGenericSocket

The socket instance.

Annotations
@Override
Exceptions
IOException:
on error.
newSocketPairback to summary
protected <P extends AFSomeSocket> AFSocketPair<P> newSocketPair(P s1, P s2)

Implements abstract org.newsclub.net.unix.AFSelectorProvider.newSocketPair.

Constructs a new socket pair from two sockets.

Parameters
<P>

Doc from org.newsclub.net.unix.AFSelectorProvider.newSocketPair. The type of the pair.

s1:P

Some socket, the first one.

s2:P

Some socket, the second one.

Returns:AFSocketPair<P>

The pair.

Annotations
@Override
openDatagramChannelback to summary
public AFGenericDatagramChannel openDatagramChannel() throws IOException

Implements abstract org.newsclub.net.unix.AFSelectorProvider.openDatagramChannel.

Doc from java.nio.channels.spi.SelectorProvider.openDatagramChannel.

Opens a datagram channel.

Returns:AFGenericDatagramChannel

The new channel

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
openDatagramChannelback to summary
public AFGenericDatagramChannel openDatagramChannel(AFSocketType type) throws IOException

Implements abstract org.newsclub.net.unix.AFSelectorProvider.openDatagramChannel.

Doc from org.newsclub.net.unix.AFSelectorProvider.openDatagramChannel.

Opens a DatagramChannel using the given socket type.

Parameters
type:AFSocketType

The socket type.

Returns:AFGenericDatagramChannel

the new channel

Annotations
@Override
Exceptions
IOException:
on error.
openDatagramChannelback to summary
public AFGenericDatagramChannel openDatagramChannel(ProtocolFamily family) throws IOException

Overrides org.newsclub.net.unix.AFSelectorProvider.openDatagramChannel.

Doc from java.nio.channels.spi.SelectorProvider.openDatagramChannel.

Opens a datagram channel.

Parameters
family:ProtocolFamily

The protocol family

Returns:AFGenericDatagramChannel

A new datagram channel

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
openDatagramChannelPairback to summary
public AFGenericSocketPair<AFGenericDatagramChannel> openDatagramChannelPair() throws IOException

Overrides org.newsclub.net.unix.AFSelectorProvider.openDatagramChannelPair.

Doc from org.newsclub.net.unix.AFSelectorProvider.openDatagramChannelPair.

Opens a socket pair of interconnected datagram channels.

Returns:AFGenericSocketPair<AFGenericDatagramChannel>

The new channel pair.

Annotations
@SuppressWarnings:unchecked
@Override
Exceptions
IOException:
on error.
openDatagramChannelPairback to summary
public AFGenericSocketPair<AFGenericDatagramChannel> openDatagramChannelPair(AFSocketType type) throws IOException

Overrides org.newsclub.net.unix.AFSelectorProvider.openDatagramChannelPair.

Doc from org.newsclub.net.unix.AFSelectorProvider.openDatagramChannelPair.

Opens a socket pair of interconnected DatagramChannels, using the given AFSocketType.

Parameters
type:AFSocketType

The socket type.

Returns:AFGenericSocketPair<AFGenericDatagramChannel>

The new channel pair.

Annotations
@SuppressWarnings:unchecked
@Override
Exceptions
IOException:
on error.
openServerSocketChannelback to summary
public AFGenericServerSocketChannel openServerSocketChannel() throws IOException

Implements abstract org.newsclub.net.unix.AFSelectorProvider.openServerSocketChannel.

Doc from java.nio.channels.spi.SelectorProvider.openServerSocketChannel.

Opens a server-socket channel.

Returns:AFGenericServerSocketChannel

The new channel

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
openServerSocketChannelback to summary
public AFGenericServerSocketChannel openServerSocketChannel(SocketAddress sa) throws IOException

Implements abstract org.newsclub.net.unix.AFSelectorProvider.openServerSocketChannel.

Doc from org.newsclub.net.unix.AFSelectorProvider.openServerSocketChannel.

Opens a server-socket channel bound on the given SocketAddress.

Parameters
sa:SocketAddress

The socket address to bind on.

Returns:AFGenericServerSocketChannel

The new channel

Annotations
@Override
Exceptions
IOException:
on error.
openSocketChannelback to summary
public AFGenericSocketChannel openSocketChannel() throws IOException

Overrides org.newsclub.net.unix.AFSelectorProvider.openSocketChannel.

Doc from java.nio.channels.spi.SelectorProvider.openSocketChannel.

Opens a socket channel.

Returns:AFGenericSocketChannel

The new channel

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
openSocketChannelback to summary
public AFGenericSocketChannel openSocketChannel(SocketAddress sa) throws IOException

Implements abstract org.newsclub.net.unix.AFSelectorProvider.openSocketChannel.

Doc from org.newsclub.net.unix.AFSelectorProvider.openSocketChannel.

Opens a socket channel connected to the given SocketAddress.

Parameters
sa:SocketAddress

The socket address to connect to.

Returns:AFGenericSocketChannel

The new channel

Annotations
@Override
Exceptions
IOException:
on error.
openSocketChannelPairback to summary
public AFGenericSocketPair<AFGenericSocketChannel> openSocketChannelPair() throws IOException

Overrides org.newsclub.net.unix.AFSelectorProvider.openSocketChannelPair.

Doc from org.newsclub.net.unix.AFSelectorProvider.openSocketChannelPair.

Opens a socket pair of interconnected channels.

Returns:AFGenericSocketPair<AFGenericSocketChannel>

The new channel pair.

Annotations
@SuppressWarnings:unchecked
@Override
Exceptions
IOException:
on error.
protocolFamilyback to summary
protected ProtocolFamily protocolFamily()

Implements abstract org.newsclub.net.unix.AFSelectorProvider.protocolFamily.

Doc from org.newsclub.net.unix.AFSelectorProvider.protocolFamily.

Returns the protocol family supported by this implementation.

Returns:ProtocolFamily

The protocol family.

Annotations
@Override
providerback to summary
public static AFGenericSelectorProvider provider()

Hides org.newsclub.net.unix.AFSelectorProvider.provider.

Returns the singleton instance.

Returns:AFGenericSelectorProvider

The instance.