public class ContextRelativeResource extends AbstractResource implements IStaticCacheableResource
AbstractResource.ContentRangeType, AbstractResource.ResourceResponse, AbstractResource.WriteCallbackIResource.AttributesCONTENT_DISPOSITION_HEADER_NAME, CONTENT_RANGE_ENDBYTE, CONTENT_RANGE_STARTBYTE, INTERNAL_HEADERS| Constructor and Description |
|---|
ContextRelativeResource(String pathRelativeToContextRoot)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Serializable |
getCacheKey()
get unique caching key for the resource stream produced by
IStaticCacheableResource.getResourceStream() |
IResourceStream |
getResourceStream()
get static resource stream which will be unique to the related caching key
IStaticCacheableResource.getCacheKey() |
int |
hashCode() |
boolean |
isCachingEnabled()
controls whether caching of the resource is enabled or disabled
|
protected AbstractResource.ResourceResponse |
newResourceResponse(IResource.Attributes attributes)
Override this method to return a
AbstractResource.ResourceResponse for the request. |
void |
setCachingEnabled(boolean enabled) |
configureCache, getCachingStrategy, respond, setRequestMetaData, setRequestRangeMetaData, setResponseContentRangeHeaderFields, setResponseHeaderspublic ContextRelativeResource(String pathRelativeToContextRoot)
pathRelativeToContextRoot - public boolean isCachingEnabled()
IStaticCacheableResourceisCachingEnabled in interface IStaticCacheableResourcepublic void setCachingEnabled(boolean enabled)
public Serializable getCacheKey()
IStaticCacheableResourceIStaticCacheableResource.getResourceStream()getCacheKey in interface IStaticCacheableResource#equals(Object) and
#hashCode()public IResourceStream getResourceStream()
IStaticCacheableResourceIStaticCacheableResource.getCacheKey()getResourceStream in interface IStaticCacheableResourcenull if no stream could be foundprotected AbstractResource.ResourceResponse newResourceResponse(IResource.Attributes attributes)
AbstractResourceAbstractResource.ResourceResponse for the request.newResourceResponse in class AbstractResourceattributes - request attributesCopyright © 2006–2021 Apache Software Foundation. All rights reserved.