- sel
- the selector with which to register this channel.
- ops
- this channel's Java.Nio.Channels.SelectionKey.
- att
- the object to attach, can be null.
Documentation for this section has not yet been entered.
Type Reason Java.Nio.Channels.ClosedChannelException if this channel is closed. Java.Lang.IllegalArgumentException if ops is not supported by this channel. Java.Nio.Channels.IllegalBlockingModeException if this channel is in blocking mode. Java.Nio.Channels.IllegalSelectorException if this channel does not have the same provider as the given selector. Java.Nio.Channels.CancelledKeyException if this channel is registered but its key has been canceled.
Registers this channel with the specified selector for the specified interest set and an object to attach. If the channel is already registered with the selector, the corresponding selection key is returned but its Java.Nio.Channels.SelectionKey is updated to ops and the attached object is updated to att. The returned key is canceled if the channel is closed while registering is in progress.
Calling this method is valid at any time. If another thread executes this method or the configureBlocking(boolean) method then this call is blocked until the other call finishes. After that, it will synchronize on the key set of the selector and thus may again block if other threads also hold locks on the key set of the same selector.