public interface Responder
| Modifier and Type | Method and Description |
|---|---|
void |
closeConnectionImmediately()
Closes the connection
|
ByteBuffer |
getData()
Returns the just-received request in a byte buffer.
|
byte[] |
getDataAsBytes()
Returns the just-received request as an array of bytes
|
void |
sendReply(byte[] bytes)
Sends a response as an array of bytes.
|
void |
sendReply(ByteBuffer byteBuffer)
Sends a response from a byte buffer.
|
void |
sendReplyAndClose(byte[] bytes)
Sends a response as an array of bytes and then closes the connection.
|
void |
sendReplyAndClose(ByteBuffer byteBuffer)
Sends a response from a byte buffer and then closes the connection.
|
byte[] getDataAsBytes()
throws IOException
IOExceptionByteBuffer getData() throws IOException
IOExceptionvoid sendReplyAndClose(byte[] bytes)
throws IOException
bytes - the contents of the responseIOExceptionvoid sendReply(byte[] bytes)
throws IOException
bytes - the contents of the responseIOExceptionvoid sendReplyAndClose(ByteBuffer byteBuffer) throws IOException
byteBuffer - the outgoing responseIOExceptionvoid sendReply(ByteBuffer byteBuffer) throws IOException
byteBuffer - the outgoing responseIOExceptionvoid closeConnectionImmediately()
throws IOException
IOExceptionCopyright © 2014. All rights reserved.