public class TemporarySelector extends Object
| Constructor and Description |
|---|
TemporarySelector(SelectableChannel theSelectableChannel)
Creates a new instance of TemporarySelector
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelAndFlushSelector(SelectionKey theSelectionKey) |
void |
close()
NOTE: There is a potential for a situation, (albiet very remote), that
some other thread may be in this TemporarySelector's select()
method while another thread is trying to call this "close" method
as a result of an explicit close of a Connection (if someone
overrides the implementation of SocketOrChannelConnectionImpl
and makes an explicit call to "close" the Connection), that call
to close the Connection may also attempt to call this close method.
|
SelectionKey |
registerChannel(SelectableChannel theSelectableChannel,
int theOps) |
void |
removeSelectedKey(SelectionKey theSelectionKey) |
int |
select(long theTimeout)
NOTE: There is a potential for a situation, (albiet very remote), that
some other thread may be initiating an explicit "close" of a
Connection (if someone overrides the implementation of
SocketOrChannelConnectionImpl and an explicit call to "close"
the Connection), that call to close the Connection may also
attempt to close a TemporarySelector.
|
public TemporarySelector(SelectableChannel theSelectableChannel) throws IOException
IOExceptionpublic int select(long theTimeout)
throws IOException
IOExceptionpublic SelectionKey registerChannel(SelectableChannel theSelectableChannel, int theOps) throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic void removeSelectedKey(SelectionKey theSelectionKey) throws IOException
IOExceptionpublic void cancelAndFlushSelector(SelectionKey theSelectionKey) throws IOException
IOExceptionCopyright © 2017–2019 Eclipse Foundation. All rights reserved.