Package software.amazon.awssdk.crt.http
Class HttpStream
java.lang.Object
software.amazon.awssdk.crt.CrtResource
software.amazon.awssdk.crt.http.HttpStreamBase
software.amazon.awssdk.crt.http.HttpStream
- All Implemented Interfaces:
AutoCloseable
An HttpStream represents a single HTTP/1.1 specific Http Request/Response.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCompletion interface for writing chunks to an http streamNested classes/interfaces inherited from class software.amazon.awssdk.crt.CrtResource
CrtResource.ResourceInstance -
Method Summary
Modifier and TypeMethodDescriptionwriteChunk(byte[] chunkData, boolean isFinalChunk) Use only for Http 1.1 Chunked Encoding.voidwriteChunk(byte[] chunkData, boolean isFinalChunk, HttpStream.HttpStreamWriteChunkCompletionCallback chunkCompletionCallback) Use only for Http 1.1 Chunked Encoding.Methods inherited from class software.amazon.awssdk.crt.http.HttpStreamBase
activate, getResponseStatusCode, incrementWindowMethods inherited from class software.amazon.awssdk.crt.CrtResource
addRef, addReferenceTo, close, collectNativeResource, collectNativeResources, decRef, getNativeHandle, getResourceLogDescription, isNull, logNativeResources, logNativeResources, removeReferenceTo, setDescription, waitForNoResources
-
Method Details
-
writeChunk
public void writeChunk(byte[] chunkData, boolean isFinalChunk, HttpStream.HttpStreamWriteChunkCompletionCallback chunkCompletionCallback) Use only for Http 1.1 Chunked Encoding. You must call activate() before using this function.- Parameters:
chunkData- chunk of data to send.isFinalChunk- if set to true, this will terminate the request stream.chunkCompletionCallback- Invoked upon the data being flushed to the wire or an error occurring.
-
writeChunk
Use only for Http 1.1 Chunked Encoding. You must call activate() before using this function.- Parameters:
chunkData- chunk of data to send.isFinalChunk- if set to true, this will terminate the request stream.- Returns:
- completable future which will complete upon the data being flushed to the wire or an error occurring.
-