public final class NioSelector
extends java.lang.Object
コンストラクタと説明 |
---|
NioSelector()
コンストラクタ.
|
修飾子とタイプ | メソッドと説明 |
---|---|
void |
close()
オブジェクトクローズ.
|
static void |
destroyKey(java.nio.channels.SelectionKey key)
SelectionKeyの破棄.
|
java.util.Iterator<java.nio.channels.SelectionKey> |
iterator()
Iteratorを取得.
|
java.nio.channels.SelectionKey |
register(java.nio.channels.SelectableChannel channel,
int op)
チャネル登録.
|
java.nio.channels.SelectionKey |
register(java.nio.channels.SelectableChannel channel,
int op,
java.lang.Object obj)
チャネル登録.
|
int |
select()
待機処理.
|
int |
select(int timeout)
待機処理.
|
void |
wakeup()
wakeup.
|
public NioSelector() throws java.lang.Exception
java.lang.Exception
- 例外.public final void close()
public final int select() throws java.lang.Exception
java.lang.Exception
- 例外.public final int select(int timeout) throws java.lang.Exception
timeout
- タイムアウト値を設定します.java.lang.Exception
- 例外.public final void wakeup()
public final java.util.Iterator<java.nio.channels.SelectionKey> iterator()
public final java.nio.channels.SelectionKey register(java.nio.channels.SelectableChannel channel, int op) throws java.lang.Exception
channel
- 登録対象のチャネルを設定します.op
- 対象のオプションを設定します.java.lang.Exception
- 例外.public final java.nio.channels.SelectionKey register(java.nio.channels.SelectableChannel channel, int op, java.lang.Object obj) throws java.lang.Exception
channel
- 登録対象のチャネルを設定します.op
- 対象のオプションを設定します.obj
- キー登録するオブジェクトを設定します.java.lang.Exception
- 例外.public static final void destroyKey(java.nio.channels.SelectionKey key)
key
- 破棄対象のSelectionKeyを設定します.