Package ru.tinkoff.kora.http.common.body
Class StreamingHttpBodyInput
java.lang.Object
java.util.concurrent.atomic.AtomicBoolean
ru.tinkoff.kora.http.common.body.StreamingHttpBodyInput
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable,Flow.Publisher<ByteBuffer>,HttpBody,HttpBodyInput
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStreamingHttpBodyInput(String contentType, long contentLength, Flow.Publisher<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.HttpBodyInput
asArrayStage, asBufferStage, asInputStream
-
Constructor Details
-
StreamingHttpBodyInput
public StreamingHttpBodyInput(@Nullable String contentType, long contentLength, Flow.Publisher<ByteBuffer> content)
-
-
Method Details
-
subscribe
- Specified by:
subscribein interfaceFlow.Publisher<ByteBuffer>- Specified by:
subscribein interfaceHttpBodyInput
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
contentLength
public long contentLength()- Specified by:
contentLengthin interfaceHttpBody- Returns:
- Русский: Возвращает длину тела запроса
English: Returns the length of the body of the request
-
contentType
- Specified by:
contentTypein interfaceHttpBody- Returns:
- Русский: Возвращает тип тела запроса как значения HTTP заголовка
English: Returns request body type as HTTP header values
Пример / Example:application/json
-