Interface ResponseContext.Key

All Known Implementing Classes:
ResponseContext.AbstractKey, ResponseContext.BooleanKey, ResponseContext.CounterKey, ResponseContext.LongKey, ResponseContext.StringKey
Enclosing class:
ResponseContext

public static interface ResponseContext.Key
The base interface of a response context key. Should be implemented by every context key.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if this key can be removed to reduce header size when the header would otherwise be too large.
     
    boolean
    Whether to return the key, value pair in the response header.
    mergeValues(Object oldValue, Object newValue)
    Merges two values of type T.
    readValue(com.fasterxml.jackson.core.JsonParser jp)
    Reads a value of this key from a JSON stream.
  • Method Details

    • getName

      String getName()
    • includeInHeader

      boolean includeInHeader()
      Whether to return the key, value pair in the response header. If false, the value is for internal use only.
    • readValue

      Object readValue(com.fasterxml.jackson.core.JsonParser jp)
      Reads a value of this key from a JSON stream. Used by ResponseContextDeserializer.
    • mergeValues

      Object mergeValues(Object oldValue, Object newValue)
      Merges two values of type T.

      This method may modify "oldValue" but must not modify "newValue".

    • canDrop

      boolean canDrop()
      Returns true if this key can be removed to reduce header size when the header would otherwise be too large.