java.lang.Object
io.helidon.http.media.ReadableEntityBase
io.helidon.webclient.api.ClientResponseEntity
- All Implemented Interfaces:
ReadableEntity
Client response entity.
-
Method Summary
Modifier and TypeMethodDescriptionCopy this entity and add a new runnable to be executed after this entity is consumed.static ClientResponseEntitycreate(Function<Integer, BufferData> readEntityFunction, Runnable entityProcessedRunnable, ClientRequestHeaders requestHeaders, ClientResponseHeaders responseHeaders, MediaContext mediaContext) Create a new client response entity.protected <T> TentityAs(GenericType<T> type) Read entity as a specific generic type.Methods inherited from class io.helidon.http.media.ReadableEntityBase
as, as, asOptional, consume, consumed, 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.http.media.ReadableEntity
as, as, asOptional, asOptional, consume, consumed, hasEntity, inputStream
-
Method Details
-
create
public static ClientResponseEntity create(Function<Integer, BufferData> readEntityFunction, Runnable entityProcessedRunnable, ClientRequestHeaders requestHeaders, ClientResponseHeaders responseHeaders, MediaContext mediaContext) Create a new client response entity.- Parameters:
readEntityFunction- function to read bytes from entity based on suggested buffer lengthentityProcessedRunnable- runnable to run when entity processing finishesrequestHeaders- request headersresponseHeaders- response headersmediaContext- media context to read into specific types- Returns:
- client response 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
Description copied from class:ReadableEntityBaseRead entity as a specific generic type.- Specified by:
entityAsin classReadableEntityBase- Type Parameters:
T- type of the entity- Parameters:
type- type the entity should be coerced into- Returns:
- entity value
-