Class DefaultByteBufferFactory

    • Field Detail

      • allocator

        private final java.util.function.Function<java.lang.Integer,​java.nio.ByteBuffer> allocator
    • Constructor Detail

      • DefaultByteBufferFactory

        public DefaultByteBufferFactory​(java.util.function.Function<java.lang.Integer,​java.nio.ByteBuffer> allocator)
      • DefaultByteBufferFactory

        public DefaultByteBufferFactory()
    • Method Detail

      • createReadBuffer

        public java.nio.ByteBuffer createReadBuffer​(NioContext nioContext)
        Description copied from interface: ByteBufferFactory
        Create the ByteBuffer 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 interface ByteBufferFactory
        Returns:
      • createWriteBuffer

        public java.nio.ByteBuffer createWriteBuffer​(NioContext nioContext)
        Description copied from interface: ByteBufferFactory
        Create the ByteBuffer 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 interface ByteBufferFactory
        Returns:
      • createEncryptedReadBuffer

        public java.nio.ByteBuffer createEncryptedReadBuffer​(NioContext nioContext)
        Description copied from interface: ByteBufferFactory
        Create the network read ByteBuffer. This buffer contains encrypted frames read from the network. The SSLEngine decrypts frame and pass them over to the read buffer.
        Specified by:
        createEncryptedReadBuffer in interface ByteBufferFactory
        Returns:
      • createEncryptedWriteBuffer

        public java.nio.ByteBuffer createEncryptedWriteBuffer​(NioContext nioContext)
        Description copied from interface: ByteBufferFactory
        Create the network write ByteBuffer. This buffer contains encrypted outbound frames. These frames come from the write buffer that sends them through the SSLContext for encryption to this buffer.
        Specified by:
        createEncryptedWriteBuffer in interface ByteBufferFactory
        Returns:
      • createEncryptedByteBuffer

        protected java.nio.ByteBuffer createEncryptedByteBuffer​(NioContext nioContext)