Package org.eclipse.jetty.http.content
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 org.eclipse.jetty.http.content.HttpContent
HttpContent.Factory, HttpContent.Wrapper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet this HTTP content as aByteBuffer
if possible.long
long
getETag()
getKey()
long
boolean
isValid()
void
release()
boolean
retain()
void
setLastAccessedNanos
(long nanosTime) Methods inherited from class org.eclipse.jetty.http.content.HttpContent.Wrapper
getContentEncoding, getContentEncodingValue, getContentType, getContentTypeValue, getResource, getWrapped, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.http.content.HttpContent
getContentEncoding, getContentEncodingValue, getContentType, getContentTypeValue, getResource
-
Constructor Details
-
CachedHttpContent
-
-
Method Details
-
getContentLengthValue
public long getContentLengthValue()- Specified by:
getContentLengthValue
in interfaceHttpContent
- Overrides:
getContentLengthValue
in classHttpContent.Wrapper
-
getByteBuffer
Description copied from interface:HttpContent
Get this HTTP content as a
ByteBuffer
if possible.Each invocation returns a new
ByteBuffer
instance that is read-only and contains valid data between the pos and the limit.- Specified by:
getByteBuffer
in interfaceHttpContent
- Overrides:
getByteBuffer
in classHttpContent.Wrapper
- Returns:
- a
ByteBuffer
instance or null.
-
getBytesOccupied
public long getBytesOccupied()- Specified by:
getBytesOccupied
in interfaceHttpContent
- Overrides:
getBytesOccupied
in classHttpContent.Wrapper
-
getLastAccessedNanos
public long getLastAccessedNanos()- Specified by:
getLastAccessedNanos
in interfaceCachingHttpContentFactory.CachingHttpContent
-
setLastAccessedNanos
public void setLastAccessedNanos(long nanosTime) - Specified by:
setLastAccessedNanos
in interfaceCachingHttpContentFactory.CachingHttpContent
-
getKey
- Specified by:
getKey
in interfaceCachingHttpContentFactory.CachingHttpContent
-
retain
public boolean retain()- Specified by:
retain
in interfaceCachingHttpContentFactory.CachingHttpContent
-
release
public void release()- Specified by:
release
in interfaceHttpContent
- Overrides:
release
in classHttpContent.Wrapper
-
getPreCompressedContentFormats
- Specified by:
getPreCompressedContentFormats
in interfaceHttpContent
- Overrides:
getPreCompressedContentFormats
in classHttpContent.Wrapper
- Returns:
- Set of available pre-compressed formats for this content, or null if this has not been checked.
-
getETag
- Specified by:
getETag
in interfaceHttpContent
- Overrides:
getETag
in classHttpContent.Wrapper
-
getETagValue
- Specified by:
getETagValue
in interfaceHttpContent
- Overrides:
getETagValue
in classHttpContent.Wrapper
-
getCharacterEncoding
- Specified by:
getCharacterEncoding
in interfaceHttpContent
- Overrides:
getCharacterEncoding
in classHttpContent.Wrapper
-
getMimeType
- Specified by:
getMimeType
in interfaceHttpContent
- Overrides:
getMimeType
in classHttpContent.Wrapper
-
getContentLength
- Specified by:
getContentLength
in interfaceHttpContent
- Overrides:
getContentLength
in classHttpContent.Wrapper
-
getLastModifiedInstant
- Specified by:
getLastModifiedInstant
in interfaceHttpContent
- Overrides:
getLastModifiedInstant
in classHttpContent.Wrapper
-
getLastModified
- Specified by:
getLastModified
in interfaceHttpContent
- Overrides:
getLastModified
in classHttpContent.Wrapper
-
getLastModifiedValue
- Specified by:
getLastModifiedValue
in interfaceHttpContent
- Overrides:
getLastModifiedValue
in classHttpContent.Wrapper
-
isValid
public boolean isValid()- Specified by:
isValid
in interfaceCachingHttpContentFactory.CachingHttpContent
-