Package io.vertx.httpproxy.spi.cache

## Class Resource

- java.lang.Object
- - io.vertx.httpproxy.spi.cache.Resource

- All Implemented Interfaces:
    `ClusterSerializable`

      public class Resource
      extends Object
      implements ClusterSerializable

  The cached object.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Resource()` |
    `Resource​(String absoluteUri, int statusCode, String statusMessage, MultiMap headers, long timestamp, long maxAge)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getAbsoluteUri()` |
    `Buffer` | `getContent()` |
    `String` | `getEtag()` |
    `MultiMap` | `getHeaders()` |
    `Instant` | `getLastModified()` |
    `long` | `getMaxAge()` |
    `int` | `getStatusCode()` |
    `String` | `getStatusMessage()` |
    `long` | `getTimestamp()` |
    `int` | `readFromBuffer​(int pos, Buffer buffer)` | Method invoked when deserializing bytes to this instance.
    `void` | `setAbsoluteUri​(String absoluteUri)` |
    `void` | `setContent​(Buffer content)` |
    `void` | `setEtag​(String etag)` |
    `void` | `setHeaders​(MultiMap headers)` |
    `void` | `setLastModified​(Instant lastModified)` |
    `void` | `setMaxAge​(long maxAge)` |
    `void` | `setStatusCode​(int statusCode)` |
    `void` | `setStatusMessage​(String statusMessage)` |
    `void` | `setTimestamp​(long timestamp)` |
    `void` | `writeToBuffer​(Buffer buffer)` | Method invoked when serializing this instance.

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

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

- - ### Constructor Detail

    - #### Resource

          public Resource()

    - #### Resource

          public Resource​(String absoluteUri,
                          int statusCode,
                          String statusMessage,
                          MultiMap headers,
                          long timestamp,
                          long maxAge)

  - ### Method Detail

    - #### writeToBuffer

          public void writeToBuffer​(Buffer buffer)

      Description copied from interface: `ClusterSerializable`
      Method invoked when serializing this instance.
      Specified by:
        `writeToBuffer` in interface `ClusterSerializable`
      Parameters:
        `buffer` - the `Buffer` where the serialized bytes must be written to

    - #### readFromBuffer

          public int readFromBuffer​(int pos,
                                    Buffer buffer)

      Description copied from interface: `ClusterSerializable`
      Method invoked when deserializing bytes to this instance.
      Specified by:
        `readFromBuffer` in interface `ClusterSerializable`
      Parameters:
        `pos` - the position where to start reading the `buffer`
        `buffer` - the `Buffer` where the serialized bytes must be read from
      Returns:
        the position after the last serialized byte

    - #### getAbsoluteUri

          public String getAbsoluteUri()

    - #### getStatusCode

          public int getStatusCode()

    - #### getStatusMessage

          public String getStatusMessage()

    - #### getHeaders

          public MultiMap getHeaders()

    - #### getTimestamp

          public long getTimestamp()

    - #### getMaxAge

          public long getMaxAge()

    - #### getLastModified

          public Instant getLastModified()

    - #### getEtag

          public String getEtag()

    - #### getContent

          public Buffer getContent()

    - #### setAbsoluteUri

          public void setAbsoluteUri​(String absoluteUri)

    - #### setStatusCode

          public void setStatusCode​(int statusCode)

    - #### setStatusMessage

          public void setStatusMessage​(String statusMessage)

    - #### setHeaders

          public void setHeaders​(MultiMap headers)

    - #### setTimestamp

          public void setTimestamp​(long timestamp)

    - #### setMaxAge

          public void setMaxAge​(long maxAge)

    - #### setLastModified

          public void setLastModified​(Instant lastModified)

    - #### setEtag

          public void setEtag​(String etag)

    - #### setContent

          public void setContent​(Buffer content)