public class HttpStream extends CrtResource
| Modifier and Type | Class and Description |
|---|---|
static interface |
HttpStream.HttpStreamWriteChunkCompletionCallback |
CrtResource.ResourceInstance| Modifier | Constructor and Description |
|---|---|
protected |
HttpStream(long ptr) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Activates the client stream.
|
protected boolean |
canReleaseReferencesImmediately()
Determines whether a resource releases its dependencies at the same time the native handle is released or if it waits.
|
int |
getResponseStatusCode()
Retrieves the Http Response Status Code
|
void |
incrementWindow(int windowSize)
Opens the Sliding Read/Write Window by the number of bytes passed as an argument for this HttpStream.
|
protected void |
releaseNativeHandle()
Cleans up the stream's associated native handle
|
CompletableFuture<Void> |
writeChunk(byte[] chunkData,
boolean isFinalChunk)
Use only for Http 1.1 Chunked Encoding.
|
void |
writeChunk(byte[] chunkData,
boolean isFinalChunk,
HttpStream.HttpStreamWriteChunkCompletionCallback chunkCompletionCallback)
Use only for Http 1.1 Chunked Encoding.
|
acquireNativeHandle, addRef, addReferenceTo, close, collectNativeResource, collectNativeResources, decRef, getNativeHandle, getResourceLogDescription, isNull, logNativeResources, releaseReferences, removeReferenceTo, setDescription, swapReferenceTo, waitForNoResourcesprotected boolean canReleaseReferencesImmediately()
canReleaseReferencesImmediately in class CrtResourceprotected void releaseNativeHandle()
releaseNativeHandle in class CrtResourcepublic void incrementWindow(int windowSize)
windowSize - How many bytes to increment the sliding window by.public void writeChunk(byte[] chunkData,
boolean isFinalChunk,
HttpStream.HttpStreamWriteChunkCompletionCallback chunkCompletionCallback)
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.public CompletableFuture<Void> writeChunk(byte[] chunkData, boolean isFinalChunk)
chunkData - chunk of data to send.isFinalChunk - if set to true, this will terminate the request stream.public void activate()
public int getResponseStatusCode()
Copyright © 2021. All rights reserved.