public class ResourceStreamerImpl extends java.lang.Object implements ResourceStreamer
ResourceStreamer.OptionsDEFAULT_OPTIONS| Constructor and Description |
|---|
ResourceStreamerImpl(Request request,
Response response,
StreamableResourceSource streamableResourceSource,
OperationTracker tracker,
boolean productionMode,
ResourceChangeTracker resourceChangeTracker,
java.lang.String omitExpirationCacheControlHeader,
AssetFactory classpathAssetFactory,
AssetFactory contextAssetFactory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
streamResource(Resource resource,
StreamableResource streamable,
java.lang.String providedChecksum,
java.util.Set<ResourceStreamer.Options> options) |
boolean |
streamResource(Resource resource,
java.lang.String providedChecksum,
java.util.Set<ResourceStreamer.Options> options)
Streams the content of the resource to the client (or sends
an alternative response such as
HttpServletResponse.SC_NOT_MODIFIED). |
boolean |
streamResource(StreamableResource streamable,
java.lang.String providedChecksum,
java.util.Set<ResourceStreamer.Options> options)
Streams a resource that has been assembled elsewhere.
|
public ResourceStreamerImpl(Request request, Response response, StreamableResourceSource streamableResourceSource, OperationTracker tracker, @Symbol(value="tapestry.production-mode") boolean productionMode, ResourceChangeTracker resourceChangeTracker, @Symbol(value="tapestry.omit-expiration-cache-control-header") java.lang.String omitExpirationCacheControlHeader, @InjectService(value="ClasspathAssetFactory") AssetFactory classpathAssetFactory, @InjectService(value="ContextAssetFactory") AssetFactory contextAssetFactory)
public boolean streamResource(Resource resource, java.lang.String providedChecksum, java.util.Set<ResourceStreamer.Options> options) throws java.io.IOException
ResourceStreamerHttpServletResponse.SC_NOT_MODIFIED). Encapsulates logic for compression
and for caching.streamResource in interface ResourceStreamerresource - to streamprovidedChecksum - checksum from URL (or null to not validate against checksum, which is normal for modules)options - enable or disable certain featuresjava.io.IOExceptionStreamableResourceSourcepublic boolean streamResource(StreamableResource streamable, java.lang.String providedChecksum, java.util.Set<ResourceStreamer.Options> options) throws java.io.IOException
ResourceStreamerstreamResource in interface ResourceStreamerstreamable - content to streamprovidedChecksum - checksum provided (in the URL) to validate against the StreamableResource.getChecksum() actual checksum}
for the resource, may be blank to not validate against the checksumoptions - enable or disable certain featuresHttpServletResponse.SC_NOT_MODIFIED response),
or false if the request was not handled (because the provided checksum did not match the actual checksum).java.io.IOExceptionpublic boolean streamResource(Resource resource, StreamableResource streamable, java.lang.String providedChecksum, java.util.Set<ResourceStreamer.Options> options) throws java.io.IOException
java.io.IOException${project.version} - Copyright © 2003-2015 The Apache Software Foundation.