Top Fields Constructors Methods
jnr.enxio.channels

public Class NativeServerSocketChannel

extends AbstractSelectableChannel
implements NativeSelectableChannel
Class Inheritance
All Implemented Interfaces
jnr.enxio.channels.NativeSelectableChannel, java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable
Imports
java.io.IOException, java.nio.channels.SelectionKey, java.nio.channels.spi.AbstractSelectableChannel, .SelectorProvider

Field Summary

Modifier and TypeField and Description
private final int
private final int

Constructor Summary

AccessConstructor and Description
public
public
NativeServerSocketChannel(SelectorProvider provider, int fd, int ops)

Method Summary

Modifier and TypeMethod and Description
public final int
protected void
protected void
implConfigureBlocking(boolean
If true then this channel will be placed in blocking mode; if false then it will be placed non-blocking mode
block
)

Implements abstract java.nio.channels.spi.AbstractSelectableChannel.implConfigureBlocking.

Adjusts this channel's blocking mode.
public final int
validOps()

Implements abstract java.nio.channels.SelectableChannel.validOps.

Returns an operation set identifying this channel's supported operations.
Inherited from java.nio.channels.spi.AbstractSelectableChannel:
blockingLockconfigureBlockingimplCloseChannelisBlockingisRegisteredkeyForproviderregister

Field Detail

fdback to summary
private final int fd
validOpsback to summary
private final int validOps

Constructor Detail

NativeServerSocketChannelback to summary
public NativeServerSocketChannel(int fd)
NativeServerSocketChannelback to summary
public NativeServerSocketChannel(SelectorProvider provider, int fd, int ops)

Method Detail

getFDback to summary
public final int getFD()

Implements jnr.enxio.channels.NativeSelectableChannel.getFD.

implCloseSelectableChannelback to summary
protected void implCloseSelectableChannel() throws IOException

Implements abstract java.nio.channels.spi.AbstractSelectableChannel.implCloseSelectableChannel.

Doc from java.nio.channels.spi.AbstractSelectableChannel.implCloseSelectableChannel.

Closes this selectable channel.

This method is invoked by the close method in order to perform the actual work of closing the channel. This method is only invoked if the channel has not yet been closed, and it is never invoked more than once.

An implementation of this method must arrange for any other thread that is blocked in an I/O operation upon this channel to return immediately, either by throwing an exception or by returning normally.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
implConfigureBlockingback to summary
protected void implConfigureBlocking(boolean block) throws IOException

Implements abstract java.nio.channels.spi.AbstractSelectableChannel.implConfigureBlocking.

Doc from java.nio.channels.spi.AbstractSelectableChannel.implConfigureBlocking.

Adjusts this channel's blocking mode.

This method is invoked by the configureBlocking method in order to perform the actual work of changing the blocking mode. This method is only invoked if the new mode is different from the current mode.

Parameters
block:boolean

If true then this channel will be placed in blocking mode; if false then it will be placed non-blocking mode

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
validOpsback to summary
public final int validOps()

Implements abstract java.nio.channels.SelectableChannel.validOps.

Doc from java.nio.channels.SelectableChannel.validOps.

Returns an operation set identifying this channel's supported operations. The bits that are set in this integer value denote exactly the operations that are valid for this channel. This method always returns the same value for a given concrete channel class.

Returns:int

The valid-operation set

Annotations
@Override