public interface ProtocolHandler
Modifier and Type | Method and Description |
---|---|
boolean |
doContinueResponse()
Continues writing the response to the channel.
|
boolean |
doProcessRequest(ByteBuffer buffer,
int count)
Analyzes the buffer and return read active status.
|
boolean |
doProcessResponse()
Creates and writes the response to the channel.
|
boolean |
requestPending()
Tests the handler whether it needs to further process this request.
|
void |
setConfig(LogConfig config)
Sets the config object.
|
void |
setKey(SelectionKey key)
Sets the selection key for subsequent invocations.
|
void setConfig(LogConfig config)
config
- The singleton config objectvoid setKey(SelectionKey key)
key
- The nio selection keyboolean doProcessRequest(ByteBuffer buffer, int count)
buffer
- The buffer to look atcount
- The number of new bytes in the bufferboolean doProcessResponse() throws IOException
IOException
- Cannot write response to channelboolean doContinueResponse() throws IOException
IOException
- Cannot write response to channelboolean requestPending()