Package org.jgrapes.webconsole.base
Class ResourceByProducer
java.lang.Object
org.jgrapes.webconsole.base.ResourceResult
org.jgrapes.webconsole.base.ResourceByProducer
- Direct Known Subclasses:
ResourceByGenerator
Returns a
Runnable
that writes to an OutputStream
as result.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Must be implemented by a content producer. -
Constructor Summary
ConstructorDescriptionResourceByProducer
(ResourceRequest request, ResourceByProducer.ContentProducer contentProducer, org.jdrupes.httpcodec.types.MediaType mediaType, Instant lastModifiedAt, int maxAge) Instantiates a result that is provided by aResourceByProducer.ContentProducer
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
process()
Specifies hoe the provided resource is processed.Methods inherited from class org.jgrapes.webconsole.base.ResourceResult
request
-
Constructor Details
-
ResourceByProducer
public ResourceByProducer(ResourceRequest request, ResourceByProducer.ContentProducer contentProducer, org.jdrupes.httpcodec.types.MediaType mediaType, Instant lastModifiedAt, int maxAge) Instantiates a result that is provided by aResourceByProducer.ContentProducer
.- Parameters:
request
- the requestcontentProducer
- the content producermediaType
- the media type, may benull
lastModifiedAt
- the last modified atmaxAge
- the max age
-
-
Method Details
-
process
Description copied from class:ResourceResult
Specifies hoe the provided resource is processed.- Specified by:
process
in classResourceResult
- Throws:
IOException
InterruptedException
-