public class CachedContentFactory.CachedHttpContent extends java.lang.Object implements HttpContent
HttpContent.ContentFactory| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
_characterEncoding |
private HttpField |
_contentLength |
private long |
_contentLengthValue |
private HttpField |
_contentType |
private java.util.concurrent.atomic.AtomicReference<java.nio.ByteBuffer> |
_directBuffer |
private HttpField |
_etag |
private java.util.concurrent.atomic.AtomicReference<java.nio.ByteBuffer> |
_indirectBuffer |
private java.lang.String |
_key |
private long |
_lastAccessed |
private HttpField |
_lastModified |
private long |
_lastModifiedValue |
private java.util.concurrent.atomic.AtomicReference<java.nio.ByteBuffer> |
_mappedBuffer |
private MimeTypes.Type |
_mimeType |
private java.util.Map<CompressedContentFormat,CachedContentFactory.CachedPrecompressedHttpContent> |
_precompressed |
private Resource |
_resource |
| Constructor and Description |
|---|
CachedHttpContent(java.lang.String pathInContext,
Resource resource,
java.util.Map<CompressedContentFormat,CachedContentFactory.CachedHttpContent> precompressedResources) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCharacterEncoding() |
HttpField |
getContentEncoding() |
java.lang.String |
getContentEncodingValue() |
HttpField |
getContentLength() |
long |
getContentLengthValue() |
HttpField |
getContentType() |
java.lang.String |
getContentTypeValue() |
java.nio.ByteBuffer |
getDirectBuffer() |
HttpField |
getETag() |
java.lang.String |
getETagValue() |
java.nio.ByteBuffer |
getIndirectBuffer() |
java.io.InputStream |
getInputStream() |
java.lang.String |
getKey() |
HttpField |
getLastModified() |
java.lang.String |
getLastModifiedValue() |
MimeTypes.Type |
getMimeType() |
java.util.Map<CompressedContentFormat,? extends HttpContent> |
getPrecompressedContents() |
java.nio.channels.ReadableByteChannel |
getReadableByteChannel() |
Resource |
getResource() |
protected void |
invalidate() |
boolean |
isCached() |
(package private) boolean |
isValid() |
void |
release() |
java.lang.String |
toString() |
private final java.lang.String _key
private final Resource _resource
private final long _contentLengthValue
private final HttpField _contentType
private final java.lang.String _characterEncoding
private final MimeTypes.Type _mimeType
private final HttpField _contentLength
private final HttpField _lastModified
private final long _lastModifiedValue
private final HttpField _etag
private final java.util.Map<CompressedContentFormat,CachedContentFactory.CachedPrecompressedHttpContent> _precompressed
private final java.util.concurrent.atomic.AtomicReference<java.nio.ByteBuffer> _indirectBuffer
private final java.util.concurrent.atomic.AtomicReference<java.nio.ByteBuffer> _directBuffer
private final java.util.concurrent.atomic.AtomicReference<java.nio.ByteBuffer> _mappedBuffer
private volatile long _lastAccessed
CachedHttpContent(java.lang.String pathInContext,
Resource resource,
java.util.Map<CompressedContentFormat,CachedContentFactory.CachedHttpContent> precompressedResources)
public java.lang.String getKey()
public boolean isCached()
public Resource getResource()
getResource in interface HttpContentpublic HttpField getETag()
getETag in interface HttpContentpublic java.lang.String getETagValue()
getETagValue in interface HttpContentboolean isValid()
protected void invalidate()
public HttpField getLastModified()
getLastModified in interface HttpContentpublic java.lang.String getLastModifiedValue()
getLastModifiedValue in interface HttpContentpublic HttpField getContentType()
getContentType in interface HttpContentpublic java.lang.String getContentTypeValue()
getContentTypeValue in interface HttpContentpublic HttpField getContentEncoding()
getContentEncoding in interface HttpContentpublic java.lang.String getContentEncodingValue()
getContentEncodingValue in interface HttpContentpublic java.lang.String getCharacterEncoding()
getCharacterEncoding in interface HttpContentpublic MimeTypes.Type getMimeType()
getMimeType in interface HttpContentpublic void release()
release in interface HttpContentpublic java.nio.ByteBuffer getIndirectBuffer()
getIndirectBuffer in interface HttpContentpublic java.nio.ByteBuffer getDirectBuffer()
getDirectBuffer in interface HttpContentpublic HttpField getContentLength()
getContentLength in interface HttpContentpublic long getContentLengthValue()
getContentLengthValue in interface HttpContentpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface HttpContentjava.io.IOExceptionpublic java.nio.channels.ReadableByteChannel getReadableByteChannel()
throws java.io.IOException
getReadableByteChannel in interface HttpContentjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Map<CompressedContentFormat,? extends HttpContent> getPrecompressedContents()
getPrecompressedContents in interface HttpContent