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 and 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 and 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 and Description
    --- | ---
    `byte[]` | `getGzippedBody()`
    `long` | `getHitCount()`
    `long` | `incrementHit()`
    `boolean` | `isOk()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### servletPath

          protected String servletPath

    - #### queryString

          protected String queryString

    - #### contentType

          protected String contentType

    - #### contentLength

          protected int contentLength

    - #### headers

          protected org.springframework.http.HttpHeaders headers

    - #### data

          protected byte[] data

  - ### Constructor Detail

    - #### CachedResponse

          public CachedResponse(String id,
                                Site site,
                                javax.servlet.http.HttpServletRequest request,
                                int status,
                                String contentType,
                                byte[] data,
                                org.springframework.http.HttpHeaders headers,
                                int timeToLive)

  - ### Method Detail

    - #### incrementHit

          public long incrementHit()

    - #### getHitCount

          public long getHitCount()

    - #### isOk

          public boolean isOk()

    - #### getGzippedBody

          public byte[] getGzippedBody()
                                throws IOException

      Throws:
        `IOException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2011–2023 aiticon GmbH. All rights reserved.