Class Message
- java.lang.Object
-
- software.amazon.awssdk.crt.CrtResource
-
- software.amazon.awssdk.crt.eventstream.Message
-
- All Implemented Interfaces:
AutoCloseable
public class Message extends CrtResource
Wrapper around an instance of aws-event-stream-message. It's auto closable, so be sure to call close when finished with the object.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class software.amazon.awssdk.crt.CrtResource
CrtResource.ResourceInstance
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canReleaseReferencesImmediately()
Override that determines whether a resource releases its dependencies at the same time the native handle is released or if it waits.ByteBuffer
getMessageBuffer()
Get the binary format of this message (i.e.protected void
releaseNativeHandle()
Required override method that must begin the release process of the acquired native handle-
Methods inherited from class software.amazon.awssdk.crt.CrtResource
acquireNativeHandle, addRef, addReferenceTo, close, collectNativeResource, collectNativeResources, decRef, getNativeHandle, getResourceLogDescription, isNull, logNativeResources, releaseReferences, removeReferenceTo, setDescription, swapReferenceTo, waitForNoResources
-
-
-
-
Method Detail
-
getMessageBuffer
public ByteBuffer getMessageBuffer()
Get the binary format of this message (i.e. for sending across the wire manually)- Returns:
- ByteBuffer wrapping the underlying message data. This buffer is only valid as long as the message itself is valid.
-
releaseNativeHandle
protected void releaseNativeHandle()
Description copied from class:CrtResource
Required override method that must begin the release process of the acquired native handle- Specified by:
releaseNativeHandle
in classCrtResource
-
canReleaseReferencesImmediately
protected boolean canReleaseReferencesImmediately()
Description copied from class:CrtResource
Override that determines whether a resource releases its dependencies at the same time the native handle is released or if it waits. Resources with asynchronous shutdown processes should override this with false, and establish a callback from native code that invokes releaseReferences() when the asynchronous shutdown process has completed. See HttpClientConnectionManager for an example.- Specified by:
canReleaseReferencesImmediately
in classCrtResource
- Returns:
- true if this resource releases synchronously, false if this resource performs async shutdown
-
-