Class PermanentSSLBufferManagementStrategy.InternalBuffer

java.lang.Object
org.apache.http.nio.reactor.ssl.PermanentSSLBufferManagementStrategy.InternalBuffer
All Implemented Interfaces:
SSLBuffer
Enclosing class:
PermanentSSLBufferManagementStrategy

private static final class PermanentSSLBufferManagementStrategy.InternalBuffer extends Object implements SSLBuffer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final ByteBuffer
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    InternalBuffer(int size)
     
  • 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • InternalBuffer

      public InternalBuffer(int size)
  • Method Details

    • acquire

      public ByteBuffer acquire()
      Description copied from interface: SSLBuffer
      Allocates the resources required for this buffer, or returns the resources already allocated for this buffer. Unless SSLBuffer.release() is called, multiple invokations to this method must return the same ByteBuffer.
      Specified by:
      acquire in interface SSLBuffer
      Returns:
      buffer
    • release

      public void release()
      Description copied from interface: SSLBuffer
      Releases the resources for this buffer. If the buffer has already been released, this method does nothing.
      Specified by:
      release in interface SSLBuffer
    • isAcquired

      public boolean isAcquired()
      Description copied from interface: SSLBuffer
      Tests to see if this buffer has been acquired.
      Specified by:
      isAcquired in interface SSLBuffer
      Returns:
      true if the buffer is acquired, otherwise false
    • hasData

      public boolean hasData()
      Description copied from interface: SSLBuffer
      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.
      Specified by:
      hasData in interface SSLBuffer
      Returns:
      true if the buffer has been acquired and the underlying buffer's position is > 0, otherwise false