Class CachingHttpContentFactory.CachedHttpContent
java.lang.Object
org.eclipse.jetty.http.content.HttpContent.Wrapper
org.eclipse.jetty.http.content.CachingHttpContentFactory.CachedHttpContent
- All Implemented Interfaces:
 CachingHttpContentFactory.CachingHttpContent, HttpContent
- Direct Known Subclasses:
 ValidatingCachingHttpContentFactory.ValidatingCachedContent
- Enclosing class:
 CachingHttpContentFactory
protected class CachingHttpContentFactory.CachedHttpContent
extends HttpContent.Wrapper
implements CachingHttpContentFactory.CachingHttpContent
- 
Nested Class Summary
Nested classes/interfaces inherited from interface HttpContent
HttpContent.Factory, HttpContent.Wrapper - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionGet the character encoding of this HTTP content.Get theHttpHeader.CONTENT_LENGTHof this HTTP content.longGet the content length of this resource.getETag()Get theHttpHeader.ETAGof this HTTP content.getKey()longGet theHttpHeader.LAST_MODIFIEDof this HTTP content.Get the last modified instant of this resource.Get the Mime type of this HTTP content.Get available pre-compressed formats for this content.booleanisValid()voidrelease()voidsetLastAccessedNanos(long nanosTime) voidwriteTo(Content.Sink sink, long offset, long length, Callback callback) Asynchronously write a subset of this HTTP content to aContent.Sink.Methods inherited from class HttpContent.Wrapper
getContentEncoding, getContentType, getResource, getWrapped, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface HttpContent
getContentEncoding, getContentEncodingValue, getContentType, getContentTypeValue, getETagValue, getResource 
- 
Constructor Details
- 
CachedHttpContent
 
 - 
 - 
Method Details
- 
getLastAccessedNanos
public long getLastAccessedNanos()- Specified by:
 getLastAccessedNanosin interfaceCachingHttpContentFactory.CachingHttpContent
 - 
setLastAccessedNanos
public void setLastAccessedNanos(long nanosTime) - Specified by:
 setLastAccessedNanosin interfaceCachingHttpContentFactory.CachingHttpContent
 - 
getKey
- Specified by:
 getKeyin interfaceCachingHttpContentFactory.CachingHttpContent
 - 
writeTo
Description copied from interface:HttpContentAsynchronously write a subset of this HTTP content to aContent.Sink. Calling this method does not consume the content, so it can be used repeatedly.- Specified by:
 writeToin interfaceHttpContent- Overrides:
 writeToin classHttpContent.Wrapper- Parameters:
 sink- the sink to write to.offset- the offset byte of the resource to start from.length- the length of the resource's contents to copy, -1 for the full length.callback- the callback to notify when writing is done.
 - 
release
public void release()- Specified by:
 releasein interfaceCachingHttpContentFactory.CachingHttpContent
 - 
getPreCompressedContentFormats
Description copied from interface:HttpContentGet available pre-compressed formats for this content.- Specified by:
 getPreCompressedContentFormatsin interfaceHttpContent- Overrides:
 getPreCompressedContentFormatsin classHttpContent.Wrapper- Returns:
 - Set of available pre-compressed formats for this content, or null if this has not been checked.
 
 - 
getETag
Description copied from interface:HttpContentGet theHttpHeader.ETAGof this HTTP content.- Specified by:
 getETagin interfaceHttpContent- Overrides:
 getETagin classHttpContent.Wrapper- Returns:
 - the ETag, or null if this content has no ETag.
 
 - 
getCharacterEncoding
Description copied from interface:HttpContentGet the character encoding of this HTTP content.- Specified by:
 getCharacterEncodingin interfaceHttpContent- Overrides:
 getCharacterEncodingin classHttpContent.Wrapper- Returns:
 - the character encoding, or null if the character encoding of this content is not known.
 
 - 
getMimeType
Description copied from interface:HttpContentGet the Mime type of this HTTP content.- Specified by:
 getMimeTypein interfaceHttpContent- Overrides:
 getMimeTypein classHttpContent.Wrapper- Returns:
 - the mime type, or null if the mime type of this content is not known.
 
 - 
getContentLength
Description copied from interface:HttpContentGet theHttpHeader.CONTENT_LENGTHof this HTTP content. The value of the returned field must always match the value returned byHttpContent.getContentLengthValue().- Specified by:
 getContentLengthin interfaceHttpContent- Overrides:
 getContentLengthin classHttpContent.Wrapper- Returns:
 - the content length field, or null if the length of this content is not known.
 
 - 
getContentLengthValue
public long getContentLengthValue()Description copied from interface:HttpContentGet the content length of this resource.- Specified by:
 getContentLengthValuein interfaceHttpContent- Overrides:
 getContentLengthValuein classHttpContent.Wrapper- Returns:
 - the content length of this resource, or -1 if it is not known.
 - See Also:
 
 - 
getLastModifiedInstant
Description copied from interface:HttpContentGet the last modified instant of this resource.- Specified by:
 getLastModifiedInstantin interfaceHttpContent- Overrides:
 getLastModifiedInstantin classHttpContent.Wrapper- Returns:
 - the last modified instant, or null if that instant of this content is not known.
 - See Also:
 
 - 
getLastModified
Description copied from interface:HttpContentGet theHttpHeader.LAST_MODIFIEDof this HTTP content. The value of the returned field must always match the value returned byHttpContent.getLastModifiedInstant().- Specified by:
 getLastModifiedin interfaceHttpContent- Overrides:
 getLastModifiedin classHttpContent.Wrapper- Returns:
 - the last modified field, or null if the last modification time of this content is not known.
 
 - 
isValid
public boolean isValid()- Specified by:
 isValidin interfaceCachingHttpContentFactory.CachingHttpContent
 
 -