- All Superinterfaces:
AutoCloseable
,Closeable
,Releasable
- All Known Subinterfaces:
HttpBody.Full
,HttpBody.Stream
- All Known Implementing Classes:
HttpBody.ByteRefHttpBody
A super-interface for different HTTP content implementations
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final record
static interface
static interface
Full content represents a complete http body content that can be accessed immediately.static interface
Stream is a lazy-loaded content. -
Method Summary
Modifier and TypeMethodDescriptiondefault HttpBody.Full
asFull()
Assumes that HTTP body is a full content.default HttpBody.Stream
asStream()
Assumes that HTTP body is a lazy-stream.static HttpBody.Full
empty()
static HttpBody.Full
fromBytesReference
(BytesReference bytesRef) default boolean
isFull()
default boolean
isStream()
Methods inherited from interface org.elasticsearch.core.Releasable
close
-
Method Details
-
fromBytesReference
-
empty
-
isFull
default boolean isFull() -
isStream
default boolean isStream() -
asFull
Assumes that HTTP body is a full content. If not sure, useisFull()
. -
asStream
Assumes that HTTP body is a lazy-stream. If not sure, useisStream()
.
-