public interface ConnectionHandler
Handler for a Connection
.
Required to be implemented by the handler provider.
Modifier and Type | Method and Description |
---|---|
void |
handleHeartbeat(HeartBeatContext context)
Handles a heart beat on
Connection . |
void |
handleRead(ReadContext context)
Handles a read from the
SocketChannel . |
void handleRead(ReadContext context) throws IOException
SocketChannel
.context
- ReadContext
.IOException
- If fails to obtain data from the ReadContext
.void handleHeartbeat(HeartBeatContext context) throws IOException
Handles a heart beat on Connection
.
Typical use of the heart beat is to allow the ConnectionHandler
to close an idle Connection
.
context
- HeartBeatContext
.IOException
- If fails to handle heart beat. Possibly from attempting to
close it.Copyright © 2005–2016. All rights reserved.