Interface SSLBuffer

All Known Implementing Classes:
PermanentSSLBufferManagementStrategy.InternalBuffer, ReleasableSSLBufferManagementStrategy.InternalBuffer

public interface SSLBuffer
Managed internal SSL buffer.
  • Method Summary

    Modifier and Type
    Method
    Description
    Allocates the resources required for this buffer, or returns the resources already allocated for this buffer.
    boolean
    Tests to make sure that the buffer has been acquired and the underlying buffer has a position larger than 0.
    boolean
    Tests to see if this buffer has been acquired.
    void
    Releases the resources for this buffer.
  • Method Details

    • acquire

      ByteBuffer acquire()
      Allocates the resources required for this buffer, or returns the resources already allocated for this buffer. Unless release() is called, multiple invokations to this method must return the same ByteBuffer.
      Returns:
      buffer
    • release

      void release()
      Releases the resources for this buffer. If the buffer has already been released, this method does nothing.
    • isAcquired

      boolean isAcquired()
      Tests to see if this buffer has been acquired.
      Returns:
      true if the buffer is acquired, otherwise false
    • hasData

      boolean hasData()
      Tests to make sure that the buffer has been acquired and the underlying buffer has a position larger than 0. Essentially the same as isAquired() && acquire().position > 0.
      Returns:
      true if the buffer has been acquired and the underlying buffer's position is > 0, otherwise false