|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rabbit.io.MultiHandlerRegistration
public class MultiHandlerRegistration
A multiplexing handler registration.
Constructor Summary | |
---|---|
MultiHandlerRegistration(SocketHandler reader,
long readWhen,
SocketHandler writer,
long writeWhen)
|
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 MultiHandlerRegistration(SocketHandler reader, long readWhen, SocketHandler writer, long writeWhen)
Method Detail |
---|
public String toString()
toString
in class Object
public String getDescription()
HandlerRegistration
getDescription
in interface HandlerRegistration
public boolean isExpired(long now, long timeout)
HandlerRegistration
isExpired
in interface HandlerRegistration
public 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 HandlerRegistration
currentOps
- the current interest opsnewOps
- the ops to handlesk
- the current channel key.sh
- the new handler to register.when
- the new timeout timingpublic void unregister(SelectionKey sk, SocketHandler sh, String reason)
HandlerRegistration
unregister
in interface HandlerRegistration
sk
- 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 HandlerRegistration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |