java.lang.Object
io.helidon.http.media.ReadableEntityBase
io.helidon.webserver.http2.Http2ServerRequestEntity
- 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 Http2ServerRequestEntitycreate(UnaryOperator<InputStream> streamFilter, UnaryOperator<InputStream> decoder, Function<Integer, BufferData> readEntityFunction, Runnable entityProcessedRunnable, ServerRequestHeaders requestHeaders, MediaContext mediaContext) Create a new entity.protected <T> TentityAs(GenericType<T> type) Input stream to read bytes of the entity.Methods inherited from class io.helidon.http.media.ReadableEntityBase
as, as, consume, consumed, empty, entityProcessedRunnable, hasEntity, readAllBytes, readEntityFunction
-
Method Details
-
create
public static Http2ServerRequestEntity create(UnaryOperator<InputStream> streamFilter, UnaryOperator<InputStream> decoder, Function<Integer, BufferData> readEntityFunction, Runnable entityProcessedRunnable, ServerRequestHeaders requestHeaders, MediaContext mediaContext) Create a new entity.- Parameters:
streamFilter- stream filter to apply to the stream, 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
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
-
inputStream
Description copied from interface:ReadableEntityInput stream to read bytes of the entity. Cannot be combined with methodsReadableEntity.as(Class)orReadableEntity.as(io.helidon.common.GenericType)- Specified by:
inputStreamin interfaceReadableEntity- Overrides:
inputStreamin classReadableEntityBase- Returns:
- input stream to entity bytes
-
entityAs
- Specified by:
entityAsin classReadableEntityBase
-