java.lang.Object
io.helidon.http.media.ReadableEntityBase
io.helidon.webserver.http.ServerRequestEntity
- All Implemented Interfaces:
ReadableEntity
Server request entity.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ServerRequestEntitycreate(Consumer<Boolean> entityRequestedCallback, UnaryOperator<InputStream> streamFilter, ContentDecoder decoder, Function<Integer, io.helidon.common.buffers.BufferData> readEntityFunction, Runnable entityProcessedRunnable, ServerRequestHeaders requestHeaders, 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, consume, consumed, empty, entityProcessedRunnable, hasEntity, readAllBytes, readEntityFunction
-
Method Details
-
create
public static ServerRequestEntity create(Consumer<Boolean> entityRequestedCallback, UnaryOperator<InputStream> streamFilter, ContentDecoder decoder, Function<Integer, io.helidon.common.buffers.BufferData> readEntityFunction, Runnable entityProcessedRunnable, ServerRequestHeaders requestHeaders, 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 interfaceReadableEntity
-
inputStream
- Specified by:
inputStreamin interfaceReadableEntity- Overrides:
inputStreamin classReadableEntityBase
-
entityAs
protected <T> T entityAs(io.helidon.common.GenericType<T> type) - Specified by:
entityAsin classReadableEntityBase
-