Package ru.tinkoff.kora.http.common.body
Class StreamingHttpBodyOutput
java.lang.Object
java.util.concurrent.atomic.AtomicBoolean
ru.tinkoff.kora.http.common.body.StreamingHttpBodyOutput
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable,Flow.Publisher<ByteBuffer>,HttpBody,HttpBodyOutput
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStreamingHttpBodyOutput(String contentType, int contentLength, Flow.Publisher<? extends ByteBuffer> content) -
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.HttpBodyOutput
write
-
Constructor Details
-
StreamingHttpBodyOutput
public StreamingHttpBodyOutput(@Nullable String contentType, int contentLength, Flow.Publisher<? extends ByteBuffer> content)
-
-
Method Details
-
contentLength
public int contentLength()- Specified by:
contentLengthin interfaceHttpBody- Specified by:
contentLengthin interfaceHttpBodyOutput
-
contentType
- Specified by:
contentTypein interfaceHttpBody- Specified by:
contentTypein interfaceHttpBodyOutput
-
subscribe
- Specified by:
subscribein interfaceFlow.Publisher<ByteBuffer>- Specified by:
subscribein interfaceHttpBodyOutput
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-