N - the type of NetworkContextpublic final class BytesBufferHandler<N extends NetworkContext> extends Object implements BufferHandler
readData, writeData
- application-side data - decrypted, handled by handleDecryptedData
The delegate TcpHandler will be invoked with decrypted input data, and its
output will be encrypted read for transmission over a socket.
| Constructor and Description |
|---|
BytesBufferHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
handleDecryptedData(ByteBuffer input,
ByteBuffer output)
Accept decrypted input data, previous collected by an invocation of
readData. |
int |
readData(ByteBuffer target)
Read encrypted data from an input into the supplied buffer.
|
void |
set(TcpHandler<N> delegate,
net.openhft.chronicle.bytes.Bytes<ByteBuffer> input,
net.openhft.chronicle.bytes.Bytes<ByteBuffer> output,
N networkContext) |
int |
writeData(ByteBuffer encrypted)
Write encrypted data to an output from the supplied buffer.
|
public void set(TcpHandler<N> delegate, net.openhft.chronicle.bytes.Bytes<ByteBuffer> input, net.openhft.chronicle.bytes.Bytes<ByteBuffer> output, N networkContext)
public int readData(ByteBuffer target)
readData in interface BufferHandlertarget - the target buffer for encrypted datapublic void handleDecryptedData(ByteBuffer input, ByteBuffer output)
readData.
Any plain-text output should be written to the output buffer for encryption.handleDecryptedData in interface BufferHandlerinput - a buffer containing decrypted input dataoutput - a buffer that can be used for writing plain-text outputpublic int writeData(ByteBuffer encrypted)
writeData in interface BufferHandlerencrypted - the buffer containing encrypted dataCopyright © 2018. All rights reserved.