Package org.jgrapes.webconsole.base
Class ResourceByGenerator
java.lang.Object
org.jgrapes.webconsole.base.ResourceResult
org.jgrapes.webconsole.base.ResourceByProducer
org.jgrapes.webconsole.base.ResourceByGenerator
Returns a
Runnable
that writes to an OutputStream
as result.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
The interface that must be implemented by the content provider.Nested classes/interfaces inherited from class org.jgrapes.webconsole.base.ResourceByProducer
ResourceByProducer.ContentProducer
-
Constructor Summary
ConstructorDescriptionResourceByGenerator
(ResourceRequest request, ResourceByGenerator.Generator generator, org.jdrupes.httpcodec.types.MediaType mediaType, Instant lastModifiedAt, int maxAge) Instantiates a result that is provided by anOutputStream
. -
Method Summary
Methods inherited from class org.jgrapes.webconsole.base.ResourceByProducer
process
Methods inherited from class org.jgrapes.webconsole.base.ResourceResult
request
-
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 anOutputStream
.- Parameters:
request
- the requestgenerator
- the generatormediaType
- the media type, may benull
lastModifiedAt
- the last modified atmaxAge
- the max age
-