Package com.rabbitmq.client.impl.nio
Class DefaultByteBufferFactory
java.lang.Object
com.rabbitmq.client.impl.nio.DefaultByteBufferFactory
- All Implemented Interfaces:
ByteBufferFactory
Default
ByteBufferFactory that creates heap-based ByteBuffers.
This behavior can be changed by passing in a custom Function<Integer,ByteBuffer>
to the constructor.- Since:
- 5.5.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ByteBuffercreateEncryptedByteBuffer(NioContext nioContext) createEncryptedReadBuffer(NioContext nioContext) Create the network readByteBuffer.createEncryptedWriteBuffer(NioContext nioContext) Create the network writeByteBuffer.createReadBuffer(NioContext nioContext) Create theByteBufferthat contains inbound frames.createWriteBuffer(NioContext nioContext) Create theByteBufferthat contains outbound frames.
-
Constructor Details
-
DefaultByteBufferFactory
-
DefaultByteBufferFactory
public DefaultByteBufferFactory()
-
-
Method Details
-
createReadBuffer
Description copied from interface:ByteBufferFactoryCreate theByteBufferthat 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.- Specified by:
createReadBufferin interfaceByteBufferFactory- Parameters:
nioContext-- Returns:
-
createWriteBuffer
Description copied from interface:ByteBufferFactoryCreate theByteBufferthat 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.- Specified by:
createWriteBufferin interfaceByteBufferFactory- Parameters:
nioContext-- Returns:
-
createEncryptedReadBuffer
Description copied from interface:ByteBufferFactoryCreate the network readByteBuffer. This buffer contains encrypted frames read from the network. TheSSLEnginedecrypts frame and pass them over to the read buffer.- Specified by:
createEncryptedReadBufferin interfaceByteBufferFactory- Parameters:
nioContext-- Returns:
-
createEncryptedWriteBuffer
Description copied from interface:ByteBufferFactoryCreate the network writeByteBuffer. This buffer contains encrypted outbound frames. These frames come from the write buffer that sends them through theSSLContextfor encryption to this buffer.- Specified by:
createEncryptedWriteBufferin interfaceByteBufferFactory- Parameters:
nioContext-- Returns:
-
createEncryptedByteBuffer
-