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

public final Class AFUNIXSelectorProvider

extends AFSelectorProvider<AFUNIXSocketAddress>
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 AFUNIXSocketAddress>
private static final AFUNIXSelectorProvider

Constructor Summary

AccessConstructor and Description
private

Method Summary

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

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

Returns the address family supported by this implementation.

public static AFUNIXSelectorProvider

Returns:

The instance.
getInstance
()

Returns the singleton instance.

protected AFUNIXSocket
newSocket()

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

Constructs a new socket.

protected <P extends AFSomeSocket> AFSocketPair<P>
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 AFUNIXDatagramChannel
public AFUNIXDatagramChannel
openDatagramChannel(AFSocketType
The socket type.
type
)

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

Opens a DatagramChannel using the given socket type.

public AFUNIXDatagramChannel
openDatagramChannel(ProtocolFamily
The protocol family
family
)

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

Opens a datagram channel.

public AFUNIXSocketPair<AFUNIXDatagramChannel>
openDatagramChannelPair()

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

Opens a socket pair of interconnected datagram channels.

public AFUNIXSocketPair<AFUNIXDatagramChannel>
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 AFUNIXServerSocketChannel
public AFUNIXServerSocketChannel
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 AFUNIXSocketChannel
public AFUNIXSocketChannel
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 AFUNIXSocketPair<AFUNIXSocketChannel>
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 AFUNIXSelectorProvider

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_UNIXback to summary
pack-priv static final AFAddressFamily<@NonNull AFUNIXSocketAddress> AF_UNIX
Annotations
@SuppressWarnings:null
INSTANCEback to summary
private static final AFUNIXSelectorProvider INSTANCE

Constructor Detail

AFUNIXSelectorProviderback to summary
private AFUNIXSelectorProvider()

Method Detail

addressFamilyback to summary
protected AFAddressFamily<@NonNull AFUNIXSocketAddress> 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 AFUNIXSocketAddress>

The address family.

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

Returns the singleton instance.

Returns:AFUNIXSelectorProvider

The instance.

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

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

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

Constructs a new socket.

Returns:AFUNIXSocket

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.

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

Constructs a new socket pair from two sockets.

Parameters
<P>
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 AFUNIXDatagramChannel openDatagramChannel() throws IOException

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

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

Opens a datagram channel.

Returns:AFUNIXDatagramChannel

The new channel

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
openDatagramChannelback to summary
public AFUNIXDatagramChannel 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:AFUNIXDatagramChannel

the new channel

Annotations
@Override
Exceptions
IOException:
on error.
openDatagramChannelback to summary
public AFUNIXDatagramChannel 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:AFUNIXDatagramChannel

A new datagram channel

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
openDatagramChannelPairback to summary
public AFUNIXSocketPair<AFUNIXDatagramChannel> 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:AFUNIXSocketPair<AFUNIXDatagramChannel>

The new channel pair.

Annotations
@SuppressWarnings:unchecked
@Override
Exceptions
IOException:
on error.
openDatagramChannelPairback to summary
public AFUNIXSocketPair<AFUNIXDatagramChannel> 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:AFUNIXSocketPair<AFUNIXDatagramChannel>

The new channel pair.

Annotations
@SuppressWarnings:unchecked
@Override
Exceptions
IOException:
on error.
openServerSocketChannelback to summary
public AFUNIXServerSocketChannel 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:AFUNIXServerSocketChannel

The new channel

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
openServerSocketChannelback to summary
public AFUNIXServerSocketChannel 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:AFUNIXServerSocketChannel

The new channel

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

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

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

Opens a socket channel.

Returns:AFUNIXSocketChannel

The new channel

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
openSocketChannelback to summary
public AFUNIXSocketChannel 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:AFUNIXSocketChannel

The new channel

Annotations
@Override
Exceptions
IOException:
on error.
openSocketChannelPairback to summary
public AFUNIXSocketPair<AFUNIXSocketChannel> 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:AFUNIXSocketPair<AFUNIXSocketChannel>

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 AFUNIXSelectorProvider provider()

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

Returns the singleton instance.

Returns:AFUNIXSelectorProvider

The instance.