Java.Nio.Channels.Spi.AbstractSelectableChannel.Register Method
Registers this channel with the specified selector for the specified interest set.

Syntax

[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 selector, [Android.Runtime.GeneratedEnum] Java.Nio.Channels.Operations interestSet, Java.Lang.Object attachment)

Parameters

selector
the selector with which to register this channel.
interestSet
this channel's Java.Nio.Channels.SelectionKey.
attachment
the object to attach, can be null.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Nio.Channels.CancelledKeyExceptionif this channel is registered but its key has been canceled.
Java.Nio.Channels.ClosedChannelExceptionif this channel is closed.
Java.Lang.IllegalArgumentExceptionif interestSet is not supported by this channel.
Java.Nio.Channels.IllegalBlockingModeExceptionif this channel is in blocking mode.
Java.Nio.Channels.IllegalSelectorExceptionif this channel does not have the same provider as the given selector.

Remarks

Registers this channel with the specified selector for the specified interest set. If the channel is already registered with the selector, the Java.Nio.Channels.SelectionKey is updated to interestSet and the corresponding selection key is returned. If the channel is not yet registered, this method calls the register method of selector and adds the selection key to this channel's key set.

[Android Documentation]

Requirements

Namespace: Java.Nio.Channels.Spi
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1