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 HttpContent
public HttpField getETag()
getETag
in interface HttpContent
public java.lang.String getETagValue()
getETagValue
in interface HttpContent
boolean isValid()
protected void invalidate()
public HttpField getLastModified()
getLastModified
in interface HttpContent
public java.lang.String getLastModifiedValue()
getLastModifiedValue
in interface HttpContent
public HttpField getContentType()
getContentType
in interface HttpContent
public java.lang.String getContentTypeValue()
getContentTypeValue
in interface HttpContent
public HttpField getContentEncoding()
getContentEncoding
in interface HttpContent
public java.lang.String getContentEncodingValue()
getContentEncodingValue
in interface HttpContent
public java.lang.String getCharacterEncoding()
getCharacterEncoding
in interface HttpContent
public MimeTypes.Type getMimeType()
getMimeType
in interface HttpContent
public void release()
release
in interface HttpContent
public java.nio.ByteBuffer getIndirectBuffer()
getIndirectBuffer
in interface HttpContent
public java.nio.ByteBuffer getDirectBuffer()
getDirectBuffer
in interface HttpContent
public HttpField getContentLength()
getContentLength
in interface HttpContent
public long getContentLengthValue()
getContentLengthValue
in interface HttpContent
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface HttpContent
java.io.IOException
public java.nio.channels.ReadableByteChannel getReadableByteChannel() throws java.io.IOException
getReadableByteChannel
in interface HttpContent
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Map<CompressedContentFormat,? extends HttpContent> getPrecompressedContents()
getPrecompressedContents
in interface HttpContent