Package org.apache.http.nio.reactor.ssl
Class ReleasableSSLBufferManagementStrategy.InternalBuffer
java.lang.Object
org.apache.http.nio.reactor.ssl.ReleasableSSLBufferManagementStrategy.InternalBuffer
- All Implemented Interfaces:
SSLBuffer
- Enclosing class:
- ReleasableSSLBufferManagementStrategy
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacquire()Allocates the resources required for this buffer, or returns the resources already allocated for this buffer.booleanhasData()Tests to make sure that the buffer has been acquired and the underlying buffer has a position larger than0.booleanTests to see if this buffer has been acquired.voidrelease()Releases the resources for this buffer.
-
Field Details
-
wrapped
-
length
private final int length
-
-
Constructor Details
-
InternalBuffer
public InternalBuffer(int size)
-
-
Method Details
-
acquire
Description copied from interface:SSLBufferAllocates 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:SSLBufferReleases the resources for this buffer. If the buffer has already been released, this method does nothing. -
isAcquired
public boolean isAcquired()Description copied from interface:SSLBufferTests to see if this buffer has been acquired.- Specified by:
isAcquiredin interfaceSSLBuffer- Returns:
trueif the buffer is acquired, otherwisefalse
-
hasData
public boolean hasData()Description copied from interface:SSLBufferTests 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.
-