|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EventHandler
Basic Handler class for IO events.
Method Summary | |
---|---|
java.nio.channels.SelectableChannel |
channel()
|
void |
onAccept()
Called by the reactor whenever a new connection is ready to be accepted (passive connection establishment) |
void |
onClose()
Called by the reactor when the handler is removed |
void |
onConnect()
Called by the reactor whenever a new Connection is ready to be estabished (active connection establishment) |
void |
onRead()
Called by the reactor whenever data is ready for reading. |
void |
onWrite()
Called by the reactor whenever a connection is ready for writing |
void |
register(int ops)
Register the handler with the reactor for certain IO events |
Method Detail |
---|
java.nio.channels.SelectableChannel channel()
void onRead() throws java.io.IOException
java.io.IOException
void onAccept() throws java.io.IOException, java.nio.channels.ClosedChannelException
java.io.IOException
java.nio.channels.ClosedChannelException
void onConnect() throws java.io.IOException
java.io.IOException
void onWrite() throws java.io.IOException
java.io.IOException
void onClose()
void register(int ops) throws java.nio.channels.ClosedChannelException, java.io.IOException
ops
- Bitmask descibing the events the handler is to be
registered for
java.nio.channels.ClosedChannelException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |