java.lang.Object
io.helidon.http.media.ReadableEntityBase
io.helidon.webserver.http.ServerRequestEntity
- All Implemented Interfaces:
io.helidon.http.media.ReadableEntity
public final class ServerRequestEntity
extends io.helidon.http.media.ReadableEntityBase
implements io.helidon.http.media.ReadableEntity
Server request entity.
-
Method Summary
Modifier and TypeMethodDescriptionio.helidon.http.media.ReadableEntitystatic ServerRequestEntitycreate(Consumer<Boolean> entityRequestedCallback, UnaryOperator<InputStream> streamFilter, io.helidon.http.encoding.ContentDecoder decoder, Function<Integer, io.helidon.common.buffers.BufferData> readEntityFunction, Runnable entityProcessedRunnable, io.helidon.http.ServerRequestHeaders requestHeaders, io.helidon.http.media.MediaContext mediaContext) Create a new entity.protected <T> TentityAs(io.helidon.common.GenericType<T> type) Methods inherited from class io.helidon.http.media.ReadableEntityBase
as, as, asOptional, consume, consumed, empty, entityProcessedRunnable, hasEntity, readAllBytes, readEntityFunctionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.http.media.ReadableEntity
as, as, asOptional, asOptional, consume, consumed, hasEntity
-
Method Details
-
create
public static ServerRequestEntity create(Consumer<Boolean> entityRequestedCallback, UnaryOperator<InputStream> streamFilter, io.helidon.http.encoding.ContentDecoder decoder, Function<Integer, io.helidon.common.buffers.BufferData> readEntityFunction, Runnable entityProcessedRunnable, io.helidon.http.ServerRequestHeaders requestHeaders, io.helidon.http.media.MediaContext mediaContext) Create a new entity.- Parameters:
entityRequestedCallback- callback invoked when entity data are requested for the first timestreamFilter- stream filter to apply, provided by userdecoder- content decoderreadEntityFunction- function to read buffer from entity (int is an estimated number of bytes needed, buffer will contain at least 1 byte)entityProcessedRunnable- runnable to run once the entity is fully readrequestHeaders- request headersmediaContext- media context to map to correct types- Returns:
- a new entity
-
copy
- Specified by:
copyin interfaceio.helidon.http.media.ReadableEntity
-
inputStream
- Specified by:
inputStreamin interfaceio.helidon.http.media.ReadableEntity- Overrides:
inputStreamin classio.helidon.http.media.ReadableEntityBase
-
entityAs
protected <T> T entityAs(io.helidon.common.GenericType<T> type) - Specified by:
entityAsin classio.helidon.http.media.ReadableEntityBase
-