Class CachingHttpContentFactory.NotFoundHttpContent
java.lang.Object
org.eclipse.jetty.http.content.CachingHttpContentFactory.NotFoundHttpContent
- All Implemented Interfaces:
CachingHttpContentFactory.CachingHttpContent
,HttpContent
- Direct Known Subclasses:
ValidatingCachingHttpContentFactory.ValidatingNotFoundContent
- Enclosing class:
CachingHttpContentFactory
protected static class CachingHttpContentFactory.NotFoundHttpContent
extends Object
implements CachingHttpContentFactory.CachingHttpContent
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.http.content.HttpContent
HttpContent.Factory, HttpContent.Wrapper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the character encoding of this HTTP content.Get theHttpHeader.CONTENT_ENCODING
of this HTTP content.Get theHttpHeader.CONTENT_LENGTH
of this HTTP content.long
Get the content length of this resource.Get theHttpHeader.CONTENT_TYPE
of this HTTP content.getETag()
Get theHttpHeader.ETAG
of this HTTP content.getKey()
long
Get theHttpHeader.LAST_MODIFIED
of 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.Get theResource
backing this HTTP content.boolean
isValid()
void
release()
void
setLastAccessedNanos
(long nanosTime) void
writeTo
(Content.Sink sink, long offset, long length, Callback callback) Asynchronously write a subset of this HTTP content to aContent.Sink
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.http.content.HttpContent
getContentEncodingValue, getContentTypeValue, getETagValue
-
Constructor Details
-
NotFoundHttpContent
-
-
Method Details
-
getKey
- Specified by:
getKey
in interfaceCachingHttpContentFactory.CachingHttpContent
-
getLastAccessedNanos
public long getLastAccessedNanos()- Specified by:
getLastAccessedNanos
in interfaceCachingHttpContentFactory.CachingHttpContent
-
setLastAccessedNanos
public void setLastAccessedNanos(long nanosTime) - Specified by:
setLastAccessedNanos
in interfaceCachingHttpContentFactory.CachingHttpContent
-
getContentType
Description copied from interface:HttpContent
Get theHttpHeader.CONTENT_TYPE
of this HTTP content.- Specified by:
getContentType
in interfaceHttpContent
- Returns:
- the content type field, or null if the type of this content is not known.
-
getCharacterEncoding
Description copied from interface:HttpContent
Get the character encoding of this HTTP content.- Specified by:
getCharacterEncoding
in interfaceHttpContent
- Returns:
- the character encoding, or null if the character encoding of this content is not known.
-
getMimeType
Description copied from interface:HttpContent
Get the Mime type of this HTTP content.- Specified by:
getMimeType
in interfaceHttpContent
- Returns:
- the mime type, or null if the mime type of this content is not known.
-
getContentEncoding
Description copied from interface:HttpContent
Get theHttpHeader.CONTENT_ENCODING
of this HTTP content.- Specified by:
getContentEncoding
in interfaceHttpContent
- Returns:
- the content encoding field, or null if the encoding of this content is not known.
-
getContentLength
Description copied from interface:HttpContent
Get theHttpHeader.CONTENT_LENGTH
of this HTTP content. The value of the returned field must always match the value returned byHttpContent.getContentLengthValue()
.- Specified by:
getContentLength
in interfaceHttpContent
- Returns:
- the content length field, or null if the length of this content is not known.
-
getContentLengthValue
public long getContentLengthValue()Description copied from interface:HttpContent
Get the content length of this resource.- Specified by:
getContentLengthValue
in interfaceHttpContent
- Returns:
- the content length of this resource, or -1 if it is not known.
- See Also:
-
getLastModifiedInstant
Description copied from interface:HttpContent
Get the last modified instant of this resource.- Specified by:
getLastModifiedInstant
in interfaceHttpContent
- Returns:
- the last modified instant, or null if that instant of this content is not known.
- See Also:
-
getLastModified
Description copied from interface:HttpContent
Get theHttpHeader.LAST_MODIFIED
of this HTTP content. The value of the returned field must always match the value returned byHttpContent.getLastModifiedInstant()
.- Specified by:
getLastModified
in interfaceHttpContent
- Returns:
- the last modified field, or null if the last modification time of this content is not known.
-
getETag
Description copied from interface:HttpContent
Get theHttpHeader.ETAG
of this HTTP content.- Specified by:
getETag
in interfaceHttpContent
- Returns:
- the ETag, or null if this content has no ETag.
-
getResource
Description copied from interface:HttpContent
Get theResource
backing this HTTP content.- Specified by:
getResource
in interfaceHttpContent
- Returns:
- the backing resource.
-
writeTo
Description copied from interface:HttpContent
Asynchronously 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:
writeTo
in interfaceHttpContent
- 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.
-
getPreCompressedContentFormats
Description copied from interface:HttpContent
Get available pre-compressed formats for this content.- Specified by:
getPreCompressedContentFormats
in interfaceHttpContent
- Returns:
- Set of available pre-compressed formats for this content, or null if this has not been checked.
-
release
public void release()- Specified by:
release
in interfaceCachingHttpContentFactory.CachingHttpContent
-
isValid
public boolean isValid()- Specified by:
isValid
in interfaceCachingHttpContentFactory.CachingHttpContent
-