|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrabbit.io.SimpleHandlerRegistration
public class SimpleHandlerRegistration
A class to hold information about when an operation was attached to the selector. Needed for timeout options.
| Constructor Summary | |
|---|---|
SimpleHandlerRegistration(SocketHandler handler,
long when)
|
|
| Method Summary | |
|---|---|
String |
getDescription()
Get a text description |
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. |
String |
toString()
|
void |
unregister(SelectionKey sk,
SocketHandler sh,
String reason)
unregister the given handler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleHandlerRegistration(SocketHandler handler,
long when)
| Method Detail |
|---|
public String toString()
toString in class Object
public boolean isExpired(long now,
long timeout)
HandlerRegistration
isExpired in interface HandlerRegistrationpublic SocketHandler getHandler(SelectionKey sk)
HandlerRegistration
getHandler in interface HandlerRegistration
public void register(int currentOps,
int newOps,
SelectionKey sk,
SocketHandler sh,
long when)
HandlerRegistration
register in interface HandlerRegistrationcurrentOps - the current interest opsnewOps - the ops to handlesk - the current channel key.sh - the new handler to register.when - the new timeout timing
public void unregister(SelectionKey sk,
SocketHandler sh,
String reason)
HandlerRegistration
unregister in interface HandlerRegistrationsk - the current channel key.sh - the handler to unregister.reason - a text message saying why the unregistration happened.public void timeout()
HandlerRegistration
timeout in interface HandlerRegistrationpublic String getDescription()
HandlerRegistration
getDescription in interface HandlerRegistration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||