AbstractSelectableChannel.Register(Selector, Operations, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers this channel with the given selector, returning a selection key.
[Android.Runtime.Register("register", "(Ljava/nio/channels/Selector;ILjava/lang/Object;)Ljava/nio/channels/SelectionKey;", "")]
public override sealed Java.Nio.Channels.SelectionKey? Register (Java.Nio.Channels.Selector? sel, Java.Nio.Channels.Operations ops, Java.Lang.Object? att);
[<Android.Runtime.Register("register", "(Ljava/nio/channels/Selector;ILjava/lang/Object;)Ljava/nio/channels/SelectionKey;", "")>]
override this.Register : Java.Nio.Channels.Selector * Java.Nio.Channels.Operations * Java.Lang.Object -> Java.Nio.Channels.SelectionKey
Parameters
- sel
- Selector
- ops
- Operations
- att
- Object
Returns
- Attributes
Exceptions
if this channel is registered but its key has been canceled.
if this channel is closed.
if interestSet
is not supported by this channel.
if this channel is in blocking mode.
if this channel does not have the same provider as the given selector.
Remarks
Registers this channel with the given selector, returning a selection key.
This method first verifies that this channel is open and that the given initial interest set is valid.
If this channel is already registered with the given selector then the selection key representing that registration is returned after setting its interest set to the given value.
Otherwise this channel has not yet been registered with the given selector, so the AbstractSelector#register register
method of the selector is invoked while holding the appropriate locks. The resulting key is added to this channel's key set before being returned.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.