Package org.apache.hc.core5.reactor.ssl
Class SSLManagedBuffer
- java.lang.Object
-
- org.apache.hc.core5.reactor.ssl.SSLManagedBuffer
-
- Direct Known Subclasses:
SSLManagedBuffer.DynamicBuffer
,SSLManagedBuffer.StaticBuffer
abstract class SSLManagedBuffer extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
SSLManagedBuffer.DynamicBuffer
(package private) static class
SSLManagedBuffer.StaticBuffer
-
Constructor Summary
Constructors Constructor Description SSLManagedBuffer()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) abstract java.nio.ByteBuffer
acquire()
Allocates the resources required for this buffer, or returns the resources already allocated for this buffer.(package private) static SSLManagedBuffer
create(SSLBufferMode mode, int size)
(package private) abstract boolean
hasData()
Tests to make sure that the buffer has been acquired and the underlying buffer has a position larger than0
.(package private) abstract boolean
isAcquired()
Tests to see if this buffer has been acquired.(package private) abstract void
release()
Releases the resources for this buffer.
-
-
-
Method Detail
-
acquire
abstract java.nio.ByteBuffer acquire()
Allocates the resources required for this buffer, or returns the resources already allocated for this buffer. Unlessrelease()
is called, multiple invocations to this method must return the sameByteBuffer
.- Returns:
- buffer
-
release
abstract void release()
Releases the resources for this buffer. If the buffer has already been released, this method does nothing.
-
isAcquired
abstract boolean isAcquired()
Tests to see if this buffer has been acquired.- Returns:
true
if the buffer is acquired, otherwisefalse
-
hasData
abstract boolean hasData()
Tests to make sure that the buffer has been acquired and the underlying buffer has a position larger than0
. Essentially the same asisAquired() && acquire().position > 0
.- Returns:
true
if the buffer has been acquired and the underlying buffer's position is> 0
, otherwisefalse
-
create
static SSLManagedBuffer create(SSLBufferMode mode, int size)
-
-