Class ClientResponseEntity

java.lang.Object
io.helidon.http.media.ReadableEntityBase
io.helidon.webclient.api.ClientResponseEntity
All Implemented Interfaces:
ReadableEntity

public final class ClientResponseEntity extends ReadableEntityBase implements ReadableEntity
Client response entity.
  • 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 length
      entityProcessedRunnable - runnable to run when entity processing finishes
      requestHeaders - request headers
      responseHeaders - response headers
      mediaContext - media context to read into specific types
      Returns:
      client response entity
    • copy

      public ReadableEntity copy(Runnable entityProcessedRunnable)
      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 interface ReadableEntity
      Parameters:
      entityProcessedRunnable - runnable to execute on consumed entity
      Returns:
      a new entity delegating to this entity
    • entityAs

      protected <T> T entityAs(GenericType<T> type)
      Specified by:
      entityAs in class ReadableEntityBase