|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HandlerRegistration
A class to hold information about when an operation was attached to the selector. Needed for timeout options.
Method Summary | |
---|---|
SocketHandler |
getHandler(SelectionKey sk)
Get the handler for the key. |
boolean |
isExpired(long now,
long timeout)
Check if this registration is expired. |
void |
register(int currentOps,
int newOps,
SelectionKey sk,
SocketHandler sh,
long when)
Registers a new handler to the given selection key. |
void |
timeout()
This handler has timed out. |
void |
unregister(SelectionKey sk,
SocketHandler sh,
String reason)
unregister the given handler. |
Method Detail |
---|
boolean isExpired(long now, long timeout)
SocketHandler getHandler(SelectionKey sk)
void register(int currentOps, int newOps, SelectionKey sk, SocketHandler sh, long when)
currentOps
- the current interest opsnewOps
- the ops to handlesk
- the current channel key.sh
- the new handler to register.when
- the new timeout timingvoid unregister(SelectionKey sk, SocketHandler sh, String reason)
sk
- the current channel key.sh
- the handler to unregister.reason
- a text message saying why the unregistration happened.void timeout()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |