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 ClientResponseEntity
create
(Function<Integer, BufferData> readEntityFunction, Runnable entityProcessedRunnable, ClientRequestHeaders requestHeaders, ClientResponseHeaders responseHeaders, MediaContext mediaContext) Create a new client response entity.protected <T> T
entityAs
(GenericType<T> type) Methods inherited from class io.helidon.http.media.ReadableEntityBase
as, as, asOptional, consume, consumed, empty, entityProcessedRunnable, hasEntity, inputStream, readAllBytes, readEntityFunction
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:ReadableEntity
Copy this entity and add a new runnable to be executed after this entity is consumed.- Specified by:
copy
in interfaceReadableEntity
- Parameters:
entityProcessedRunnable
- runnable to execute on consumed entity- Returns:
- a new entity delegating to this entity
-
entityAs
- Specified by:
entityAs
in classReadableEntityBase
-