Class ResourceByGenerator


Returns a Runnable that writes to an OutputStream as result.
  • Constructor Details

    • ResourceByGenerator

      public ResourceByGenerator(ResourceRequest request, ResourceByGenerator.Generator generator, org.jdrupes.httpcodec.types.MediaType mediaType, Instant lastModifiedAt, int maxAge)
      Instantiates a result that is provided by an OutputStream.
      Parameters:
      request - the request
      generator - the generator
      mediaType - the media type, may be null
      lastModifiedAt - the last modified at
      maxAge - the max age