Class AsyncHttpClientStreamingResponseBody
java.lang.Object
java.util.concurrent.atomic.AtomicBoolean
ru.tinkoff.kora.http.client.async.response.AsyncHttpClientStreamingResponseBody
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable,Flow.Publisher<ByteBuffer>,ru.tinkoff.kora.http.common.body.HttpBody,ru.tinkoff.kora.http.common.body.HttpBodyInput
public final class AsyncHttpClientStreamingResponseBody
extends AtomicBoolean
implements ru.tinkoff.kora.http.common.body.HttpBodyInput
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncHttpClientStreamingResponseBody(io.netty.handler.codec.http.HttpHeaders headers, Flow.Publisher<ByteBuffer> bodyStream) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intvoidsubscribe(Flow.Subscriber<? super ByteBuffer> subscriber) Methods inherited from class java.util.concurrent.atomic.AtomicBoolean
compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndSet, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatileMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ru.tinkoff.kora.http.common.body.HttpBody
getFullContentIfAvailableMethods inherited from interface ru.tinkoff.kora.http.common.body.HttpBodyInput
asArrayStage, asBufferStage, asInputStream
-
Constructor Details
-
AsyncHttpClientStreamingResponseBody
public AsyncHttpClientStreamingResponseBody(io.netty.handler.codec.http.HttpHeaders headers, Flow.Publisher<ByteBuffer> bodyStream)
-
-
Method Details
-
contentLength
public int contentLength()- Specified by:
contentLengthin interfaceru.tinkoff.kora.http.common.body.HttpBody
-
contentType
- Specified by:
contentTypein interfaceru.tinkoff.kora.http.common.body.HttpBody
-
subscribe
- Specified by:
subscribein interfaceFlow.Publisher<ByteBuffer>- Specified by:
subscribein interfaceru.tinkoff.kora.http.common.body.HttpBodyInput
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-