Class ResourceStreamerImpl
- java.lang.Object
 - 
- org.apache.tapestry5.internal.services.ResourceStreamerImpl
 
 
- 
- All Implemented Interfaces:
 ResourceStreamer
public class ResourceStreamerImpl extends Object implements ResourceStreamer
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface org.apache.tapestry5.internal.services.ResourceStreamer
ResourceStreamer.Options 
 - 
 
- 
Field Summary
- 
Fields inherited from interface org.apache.tapestry5.internal.services.ResourceStreamer
DEFAULT_OPTIONS 
 - 
 
- 
Constructor Summary
Constructors Constructor Description ResourceStreamerImpl(Request request, Response response, StreamableResourceSource streamableResourceSource, OperationTracker tracker, boolean productionMode, ResourceChangeTracker resourceChangeTracker, String omitExpirationCacheControlHeader, AssetFactory classpathAssetFactory, AssetFactory contextAssetFactory) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanstreamResource(Resource resource, String providedChecksum, Set<ResourceStreamer.Options> options)Streams the content of the resource to the client (or sends an alternative response such asHttpServletResponse.SC_NOT_MODIFIED).booleanstreamResource(Resource resource, StreamableResource streamable, String providedChecksum, Set<ResourceStreamer.Options> options)booleanstreamResource(StreamableResource streamable, String providedChecksum, Set<ResourceStreamer.Options> options)Streams a resource that has been assembled elsewhere. 
 - 
 
- 
- 
Constructor Detail
- 
ResourceStreamerImpl
public ResourceStreamerImpl(Request request, Response response, StreamableResourceSource streamableResourceSource, OperationTracker tracker, @Symbol("tapestry.production-mode") boolean productionMode, ResourceChangeTracker resourceChangeTracker, @Symbol("tapestry.omit-expiration-cache-control-header") String omitExpirationCacheControlHeader, @InjectService("ClasspathAssetFactory") AssetFactory classpathAssetFactory, @InjectService("ContextAssetFactory") AssetFactory contextAssetFactory)
 
 - 
 
- 
Method Detail
- 
streamResource
public boolean streamResource(Resource resource, String providedChecksum, Set<ResourceStreamer.Options> options) throws IOException
Description copied from interface:ResourceStreamerStreams the content of the resource to the client (or sends an alternative response such asHttpServletResponse.SC_NOT_MODIFIED). Encapsulates logic for compression and for caching.- Specified by:
 streamResourcein interfaceResourceStreamer- Parameters:
 resource- to streamprovidedChecksum- checksum from URL (or null to not validate against checksum, which is normal for modules)options- enable or disable certain features- Throws:
 IOException- See Also:
 StreamableResourceSource
 
- 
streamResource
public boolean streamResource(StreamableResource streamable, String providedChecksum, Set<ResourceStreamer.Options> options) throws IOException
Description copied from interface:ResourceStreamerStreams a resource that has been assembled elsewhere. The StreamableResource may reflect either a normal or a compressed stream, depending on the type of resource and the capabilities of the client.- Specified by:
 streamResourcein interfaceResourceStreamer- Parameters:
 streamable- 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 features- Returns:
 - true if the request was handled (even if sending a 
HttpServletResponse.SC_NOT_MODIFIEDresponse), or false if the request was not handled (because the provided checksum did not match the actual checksum). - Throws:
 IOException
 
- 
streamResource
public boolean streamResource(Resource resource, StreamableResource streamable, String providedChecksum, Set<ResourceStreamer.Options> options) throws IOException
- Throws:
 IOException
 
 - 
 
 -