Package com.rabbitmq.client.impl.nio
Class DefaultByteBufferFactory
- java.lang.Object
-
- com.rabbitmq.client.impl.nio.DefaultByteBufferFactory
-
- All Implemented Interfaces:
ByteBufferFactory
public class DefaultByteBufferFactory extends Object implements ByteBufferFactory
DefaultByteBufferFactory
that creates heap-basedByteBuffer
s. This behavior can be changed by passing in a customDefaultByteBufferFactory.ByteBufferAllocator
to the constructor.- Since:
- 4.9.0
- See Also:
NioParams
,ByteBufferFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DefaultByteBufferFactory.ByteBufferAllocator
-
Constructor Summary
Constructors Constructor Description DefaultByteBufferFactory()
DefaultByteBufferFactory(DefaultByteBufferFactory.ByteBufferAllocator allocator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ByteBuffer
createEncryptedByteBuffer(NioContext nioContext)
ByteBuffer
createEncryptedReadBuffer(NioContext nioContext)
Create the network readByteBuffer
.ByteBuffer
createEncryptedWriteBuffer(NioContext nioContext)
Create the network writeByteBuffer
.ByteBuffer
createReadBuffer(NioContext nioContext)
Create theByteBuffer
that contains inbound frames.ByteBuffer
createWriteBuffer(NioContext nioContext)
Create theByteBuffer
that contains outbound frames.
-
-
-
Constructor Detail
-
DefaultByteBufferFactory
public DefaultByteBufferFactory(DefaultByteBufferFactory.ByteBufferAllocator allocator)
-
DefaultByteBufferFactory
public DefaultByteBufferFactory()
-
-
Method Detail
-
createReadBuffer
public ByteBuffer createReadBuffer(NioContext nioContext)
Description copied from interface:ByteBufferFactory
Create theByteBuffer
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.- Specified by:
createReadBuffer
in interfaceByteBufferFactory
- Returns:
-
createWriteBuffer
public ByteBuffer createWriteBuffer(NioContext nioContext)
Description copied from interface:ByteBufferFactory
Create theByteBuffer
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.- Specified by:
createWriteBuffer
in interfaceByteBufferFactory
- Returns:
-
createEncryptedReadBuffer
public ByteBuffer createEncryptedReadBuffer(NioContext nioContext)
Description copied from interface:ByteBufferFactory
Create the network readByteBuffer
. This buffer contains encrypted frames read from the network. TheSSLEngine
decrypts frame and pass them over to the read buffer.- Specified by:
createEncryptedReadBuffer
in interfaceByteBufferFactory
- Returns:
-
createEncryptedWriteBuffer
public ByteBuffer createEncryptedWriteBuffer(NioContext nioContext)
Description copied from interface:ByteBufferFactory
Create the network writeByteBuffer
. This buffer contains encrypted outbound frames. These frames come from the write buffer that sends them through theSSLContext
for encryption to this buffer.- Specified by:
createEncryptedWriteBuffer
in interfaceByteBufferFactory
- Returns:
-
createEncryptedByteBuffer
protected ByteBuffer createEncryptedByteBuffer(NioContext nioContext)
-
-