Class FileCacheEntry
- java.lang.Object
-
- org.glassfish.grizzly.http.server.filecache.FileCacheEntry
-
-
Field Summary
Fields Modifier and Type Field Description org.glassfish.grizzly.http.util.ContentTypecontentTypeStringdateStringEtagStringhostFileCacheKeykeylonglastModifiedStringlastModifiedHeaderStringrequestURIStringserverlongtimeoutMillisFileCache.CacheTypetypeStringxPoweredBy
-
Constructor Summary
Constructors Constructor Description FileCacheEntry(FileCache fileCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanServeCompressed(org.glassfish.grizzly.http.HttpRequestPacket request)Returns true if this entry could be served compressed as response to this (passed) specificHttpRequestPacket.protected voidfinalize()ByteBuffergetByteBuffer(boolean isCompressed)Returns the entry'sByteBufferrepresentation.FilegetFile(boolean isCompressed)Returns the entry'sFilereference.longgetFileSize(boolean isCompressed)Returns the entry file size.voidrun()StringtoString()
-
-
-
Field Detail
-
key
public FileCacheKey key
-
host
public String host
-
requestURI
public String requestURI
-
lastModified
public long lastModified
-
contentType
public org.glassfish.grizzly.http.util.ContentType contentType
-
xPoweredBy
public String xPoweredBy
-
type
public FileCache.CacheType type
-
date
public String date
-
Etag
public String Etag
-
lastModifiedHeader
public String lastModifiedHeader
-
server
public String server
-
timeoutMillis
public volatile long timeoutMillis
-
-
Constructor Detail
-
FileCacheEntry
public FileCacheEntry(FileCache fileCache)
-
-
Method Detail
-
canServeCompressed
public boolean canServeCompressed(org.glassfish.grizzly.http.HttpRequestPacket request)
Returns true if this entry could be served compressed as response to this (passed) specificHttpRequestPacket. Or false will be returned otherwise.
-
getFileSize
public long getFileSize(boolean isCompressed)
Returns the entry file size.- Parameters:
isCompressed- if true the compressed file size will be returned, otherwise uncompressed file size will be returned as the result.- Returns:
- the entry file size
-
getByteBuffer
public ByteBuffer getByteBuffer(boolean isCompressed)
Returns the entry'sByteBufferrepresentation.- Parameters:
isCompressed- if true the compressedByteBufferwill be returned, otherwise uncompressedByteBufferwill be returned as the result.- Returns:
- the entry's
ByteBufferreference
-
-