org.glassfish.grizzly.nio
Interface SelectorHandler
- All Known Implementing Classes:
- DefaultSelectorHandler
public interface SelectorHandler
- Author:
- Alexey Stashok
|
Method Summary |
void |
deregisterChannel(SelectorRunner selectorRunner,
SelectableChannel channel)
Deregister the channel from the SelectorRunner's Selector. |
GrizzlyFuture<RegisterChannelResult> |
deregisterChannelAsync(SelectorRunner selectorRunner,
SelectableChannel channel,
CompletionHandler<RegisterChannelResult> completionHandler)
Deregister the channel from the SelectorRunner's Selector. |
void |
deregisterKeyInterest(SelectorRunner selectorRunner,
SelectionKey key,
int interest)
|
GrizzlyFuture<Runnable> |
executeInSelectorThread(SelectorRunner selectorRunner,
Runnable runnableTask,
CompletionHandler<Runnable> completionHandler)
|
long |
getSelectTimeout()
|
boolean |
onSelectorClosed(SelectorRunner selectorRunner)
|
void |
postSelect(SelectorRunner selectorRunner)
|
void |
preSelect(SelectorRunner selectorRunner)
|
void |
registerChannel(SelectorRunner selectorRunner,
SelectableChannel channel,
int interest,
Object attachment)
|
GrizzlyFuture<RegisterChannelResult> |
registerChannelAsync(SelectorRunner selectorRunner,
SelectableChannel channel,
int interest,
Object attachment,
CompletionHandler<RegisterChannelResult> completionHandler)
|
void |
registerKeyInterest(SelectorRunner selectorRunner,
SelectionKey key,
int interest)
|
Set<SelectionKey> |
select(SelectorRunner selectorRunner)
|
getSelectTimeout
long getSelectTimeout()
preSelect
void preSelect(SelectorRunner selectorRunner)
throws IOException
- Throws:
IOException
select
Set<SelectionKey> select(SelectorRunner selectorRunner)
throws IOException
- Throws:
IOException
postSelect
void postSelect(SelectorRunner selectorRunner)
throws IOException
- Throws:
IOException
registerKeyInterest
void registerKeyInterest(SelectorRunner selectorRunner,
SelectionKey key,
int interest)
throws IOException
- Throws:
IOException
deregisterKeyInterest
void deregisterKeyInterest(SelectorRunner selectorRunner,
SelectionKey key,
int interest)
throws IOException
- Throws:
IOException
registerChannel
void registerChannel(SelectorRunner selectorRunner,
SelectableChannel channel,
int interest,
Object attachment)
throws IOException
- Throws:
IOException
registerChannelAsync
GrizzlyFuture<RegisterChannelResult> registerChannelAsync(SelectorRunner selectorRunner,
SelectableChannel channel,
int interest,
Object attachment,
CompletionHandler<RegisterChannelResult> completionHandler)
throws IOException
- Throws:
IOException
deregisterChannel
void deregisterChannel(SelectorRunner selectorRunner,
SelectableChannel channel)
throws IOException
- Deregister the channel from the
SelectorRunner's Selector.
- Parameters:
selectorRunner - SelectorRunnerchannel - SelectableChannel channel to deregister
- Throws:
IOException
deregisterChannelAsync
GrizzlyFuture<RegisterChannelResult> deregisterChannelAsync(SelectorRunner selectorRunner,
SelectableChannel channel,
CompletionHandler<RegisterChannelResult> completionHandler)
throws IOException
- Deregister the channel from the
SelectorRunner's Selector.
- Parameters:
selectorRunner - SelectorRunnerchannel - SelectableChannel channel to deregistercompletionHandler - CompletionHandler
- Throws:
IOException
executeInSelectorThread
GrizzlyFuture<Runnable> executeInSelectorThread(SelectorRunner selectorRunner,
Runnable runnableTask,
CompletionHandler<Runnable> completionHandler)
onSelectorClosed
boolean onSelectorClosed(SelectorRunner selectorRunner)
Copyright © 2011 Oracle Corpration. All Rights Reserved.