Registers this channel with the given selector, returning a selection key.
If this channel is currently registered with the given selector then
the selection key representing that registration is returned. The key's
interest set will have been changed to ops, as if by invoking
interestOps(int) method. If
the att argument is not null then the key's attachment
will have been set to that value. A
be thrown if the key has already been cancelled.
Otherwise this channel has not yet been registered with the given selector, so it is registered and the resulting new key is returned. The key's initial interest set will be ops and its attachment will be att.
This method may be invoked at any time. If this method is invoked
while another invocation of this method or of the
configureBlocking method is in progress
then it will first block until the other operation is complete. This
method will then synchronize on the selector's key set and therefore may
block if invoked concurrently with another registration or selection
operation involving the same selector.
If this channel is closed while this operation is in progress then the key returned by this method will have been cancelled and will therefore be invalid.
|The selector with which this channel is to be registered|
|The interest set for the resulting key|
|The attachment for the resulting key; may be null|
|If this channel is closed|
|If the selector is closed|
|If this channel is in blocking mode|
|If this channel was not created by the same provider as the given selector|
|If this channel is currently registered with the given selector but the corresponding key has already been cancelled|
| If a bit in the ops set does not correspond to an
operation that is supported by this channel, that is, if