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
public class HttpStream extends HttpStreamBase
An HttpStream represents a single HTTP/1.1 specific Http Request/Response.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHttpStream.HttpStreamWriteChunkCompletionCallbackCompletion interface for writing chunks to an http stream-
Nested classes/interfaces inherited from class software.amazon.awssdk.crt.http.HttpStreamBase
HttpStreamBase.HttpStreamWriteDataCompletionCallback
-
Nested classes/interfaces inherited from class software.amazon.awssdk.crt.CrtResource
CrtResource.ResourceInstance
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CompletableFuture<Void>writeChunk(byte[] chunkData, boolean isFinalChunk)Deprecated.UseHttpStreamBase.writeData(byte[], boolean)instead.voidwriteChunk(byte[] chunkData, boolean isFinalChunk, HttpStream.HttpStreamWriteChunkCompletionCallback chunkCompletionCallback)Deprecated.-
Methods inherited from class software.amazon.awssdk.crt.http.HttpStreamBase
activate, cancel, getResponseStatusCode, incrementWindow, writeData, writeData
-
Methods inherited from class software.amazon.awssdk.crt.CrtResource
addRef, addRef, addReferenceTo, close, close, collectNativeResource, collectNativeResources, decRef, decRef, decRef, getNativeHandle, getResourceLogDescription, isNull, logNativeResources, logNativeResources, removeReferenceTo, setDescription, waitForNoResources
-
-
-
-
Method Detail
-
writeChunk
@Deprecated public void writeChunk(byte[] chunkData, boolean isFinalChunk, HttpStream.HttpStreamWriteChunkCompletionCallback chunkCompletionCallback)
Deprecated.UseHttpStreamBase.writeData(byte[], boolean, HttpStreamWriteDataCompletionCallback)instead. writeData() works for both HTTP/1.1 and HTTP/2, whereas writeChunk() is HTTP/1.1 only.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
@Deprecated public CompletableFuture<Void> writeChunk(byte[] chunkData, boolean isFinalChunk)
Deprecated.UseHttpStreamBase.writeData(byte[], boolean)instead. writeData() works for both HTTP/1.1 and HTTP/2, whereas writeChunk() is HTTP/1.1 only.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.
-
-