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, long contentLength, Flow.Publisher<? extends ByteBuffer> content) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longvoidsubscribe(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, long contentLength, Flow.Publisher<? extends ByteBuffer> content)
-
-
Method Details
-
contentLength
public long contentLength()- Specified by:
contentLengthin interfaceHttpBody- Specified by:
contentLengthin interfaceHttpBodyOutput- Returns:
- Русский: Возвращает длину тела запроса
English: Returns the length of the body of the request
-
contentType
- Specified by:
contentTypein interfaceHttpBody- Specified by:
contentTypein interfaceHttpBodyOutput- Returns:
- Русский: Возвращает тип тела запроса как значения HTTP заголовка
English: Returns request body type as HTTP header values
Пример / Example:application/json
-
subscribe
- Specified by:
subscribein interfaceFlow.Publisher<ByteBuffer>- Specified by:
subscribein interfaceHttpBodyOutput
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-