Interface Tracker


public interface Tracker
Interface for objects that provide a tracker property. Tracker values, or "cookies", are generally provided by external clients and returned in response payloads, particularly websocket events. This provides an easy way for external clients to correlate asynchronous data with requests.

Since trackers are provided by external clients, they should be restricted to MAX_TRACKER_LEN (256 characters).

Since:
1.0
Version:
2022-10-24
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sets the tracker value with no restrictions.
    Returns the tracker value.
    default void
    setTracker(String tracker)
    Default implementation of setTracker() .
  • Method Details

    • getTracker

      String getTracker()
      Returns the tracker value.
    • _setTracker

      void _setTracker(String tracker)
      Sets the tracker value with no restrictions. This is called from setTracker() .
      Parameters:
      tracker - the tracker string
    • setTracker

      default void setTracker(String tracker)
      Default implementation of setTracker() . It restricts the length of the tracker string to MAX_TRACKER_LEN , since it comes from an external client. It then calls _setTracker() with the final tracker value.
      Parameters:
      tracker - the raw/unrestricted tracker string