Package org.apache.http.nio.reactor.ssl
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 java.lang.Object implements SSLBuffer
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.ByteBuffer
buffer
-
Constructor Summary
Constructors Constructor Description InternalBuffer(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBuffer
acquire()
Allocates the resources required for this buffer, or returns the resources already allocated for this buffer.boolean
hasData()
Tests to make sure that the buffer has been acquired and the underlying buffer has a position larger than0
.boolean
isAcquired()
Tests to see if this buffer has been acquired.void
release()
Releases the resources for this buffer.
-
-
-
Method Detail
-
acquire
public java.nio.ByteBuffer acquire()
Description copied from interface:SSLBuffer
Allocates the resources required for this buffer, or returns the resources already allocated for this buffer. UnlessSSLBuffer.release()
is called, multiple invokations to this method must return the sameByteBuffer
.
-
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.
-
isAcquired
public boolean isAcquired()
Description copied from interface:SSLBuffer
Tests to see if this buffer has been acquired.- Specified by:
isAcquired
in interfaceSSLBuffer
- Returns:
true
if the buffer is acquired, otherwisefalse
-
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 than0
. Essentially the same asisAquired() && acquire().position > 0
.
-
-