public class DefaultByteBufferFactory extends Object implements ByteBufferFactory
ByteBufferFactory that creates heap-based ByteBuffers.
This behavior can be changed by passing in a custom Function
to the constructor.NioParams,
ByteBufferFactory| Constructor and Description |
|---|
DefaultByteBufferFactory() |
DefaultByteBufferFactory(Function<Integer,ByteBuffer> allocator) |
| Modifier and Type | Method and Description |
|---|---|
protected ByteBuffer |
createEncryptedByteBuffer(NioContext nioContext) |
ByteBuffer |
createEncryptedReadBuffer(NioContext nioContext)
Create the network read
ByteBuffer. |
ByteBuffer |
createEncryptedWriteBuffer(NioContext nioContext)
Create the network write
ByteBuffer. |
ByteBuffer |
createReadBuffer(NioContext nioContext)
Create the
ByteBuffer that contains inbound frames. |
ByteBuffer |
createWriteBuffer(NioContext nioContext)
Create the
ByteBuffer that contains outbound frames. |
public DefaultByteBufferFactory(Function<Integer,ByteBuffer> allocator)
public DefaultByteBufferFactory()
public ByteBuffer createReadBuffer(NioContext nioContext)
ByteBufferFactoryByteBuffer that contains inbound frames.
This buffer is the network buffer for plain connections.
When using SSL/TLS, this buffer isn't directly connected to
the network, the encrypted read buffer is.createReadBuffer in interface ByteBufferFactorypublic ByteBuffer createWriteBuffer(NioContext nioContext)
ByteBufferFactoryByteBuffer that contains outbound frames.
This buffer is the network buffer for plain connections.
When using SSL/TLS, this buffer isn't directed connected to
the network, the encrypted write buffer is.createWriteBuffer in interface ByteBufferFactorypublic ByteBuffer createEncryptedReadBuffer(NioContext nioContext)
ByteBufferFactoryByteBuffer.
This buffer contains encrypted frames read from the network.
The SSLEngine decrypts frame and pass them
over to the read buffer.createEncryptedReadBuffer in interface ByteBufferFactorypublic ByteBuffer createEncryptedWriteBuffer(NioContext nioContext)
ByteBufferFactoryByteBuffer.
This buffer contains encrypted outbound frames. These
frames come from the write buffer that sends them through
the SSLContext for encryption to
this buffer.createEncryptedWriteBuffer in interface ByteBufferFactoryprotected ByteBuffer createEncryptedByteBuffer(NioContext nioContext)
Copyright © 2021 VMware, Inc. or its affiliates.. All rights reserved.