Package org.appng.core.controller
Class CachedResponse
- java.lang.Object
-
- org.appng.core.controller.CachedResponse
-
- All Implemented Interfaces:
Serializable
public class CachedResponse extends Object implements Serializable
A simple value object representing an element of the site cache. Instances of this class will be put into the cache.- Author:
- Matthias Herlitzius, Matthias Müller
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
contentLength
protected String
contentType
protected byte[]
data
protected org.springframework.http.HttpHeaders
headers
protected String
queryString
protected String
servletPath
-
Constructor Summary
Constructors Constructor Description CachedResponse(String id, Site site, javax.servlet.http.HttpServletRequest request, int status, String contentType, byte[] data, org.springframework.http.HttpHeaders headers, int timeToLive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getGzippedBody()
long
getHitCount()
long
incrementHit()
boolean
isOk()
String
toString()
-
-
-
Method Detail
-
incrementHit
public long incrementHit()
-
getHitCount
public long getHitCount()
-
isOk
public boolean isOk()
-
getGzippedBody
public byte[] getGzippedBody() throws IOException
- Throws:
IOException
-
-