java.lang.Object
io.helidon.nima.http.media.ReadableEntityBase
io.helidon.nima.webserver.http.ServerRequestEntity
- All Implemented Interfaces:
ReadableEntity
Server request entity.
-
Method Summary
Modifier and TypeMethodDescriptionCopy this entity and add a new runnable to be executed after this entity is consumed.static ServerRequestEntitycreate(Consumer<Boolean> entityRequestedCallback, ContentDecoder decoder, Function<Integer, BufferData> readEntityFunction, Runnable entityProcessedRunnable, ServerRequestHeaders requestHeaders, MediaContext mediaContext) Create a new entity.protected <T> TentityAs(GenericType<T> type) Methods inherited from class io.helidon.nima.http.media.ReadableEntityBase
as, as, consume, consumed, contentDecoder, empty, entityProcessedRunnable, hasEntity, inputStream, readAllBytes, readEntityFunctionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.nima.http.media.ReadableEntity
as, as, consume, consumed, hasEntity, inputStream
-
Method Details
-
create
public static ServerRequestEntity create(Consumer<Boolean> entityRequestedCallback, ContentDecoder decoder, Function<Integer, BufferData> readEntityFunction, Runnable entityProcessedRunnable, ServerRequestHeaders requestHeaders, MediaContext mediaContext) Create a new entity.- Parameters:
entityRequestedCallback- callback invoked when entity data are requested for the first timedecoder- 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
Description copied from interface:ReadableEntityCopy this entity and add a new runnable to be executed after this entity is consumed.- Specified by:
copyin interfaceReadableEntity- Parameters:
entityProcessedRunnable- runnable to execute on consumed entity- Returns:
- a new entity delegating to this entity
-
entityAs
- Specified by:
entityAsin classReadableEntityBase
-