Class SessionCookieJar

java.lang.Object
com.appscend.utilities.SessionCookieJar
All Implemented Interfaces:
okhttp3.CookieJar

public final class SessionCookieJar extends Object implements okhttp3.CookieJar
In-memory, never persisted; accepts cookies from the original server only.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface okhttp3.CookieJar

    okhttp3.CookieJar.Companion
  • Field Summary

    Fields inherited from interface okhttp3.CookieJar

    Companion, NO_COOKIES
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
     
    List<okhttp3.Cookie>
    loadForRequest(okhttp3.HttpUrl url)
     
    void
    saveFromResponse(okhttp3.HttpUrl url, List<okhttp3.Cookie> incoming)
     
    static void
    setEnabled(boolean on)
    Process-wide switch; while off, every jar drops what it holds and neither stores nor sends cookies.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SessionCookieJar

      public SessionCookieJar()
  • Method Details

    • setEnabled

      public static void setEnabled(boolean on)
      Process-wide switch; while off, every jar drops what it holds and neither stores nor sends cookies.
    • isEnabled

      public static boolean isEnabled()
    • saveFromResponse

      public void saveFromResponse(okhttp3.HttpUrl url, List<okhttp3.Cookie> incoming)
      Specified by:
      saveFromResponse in interface okhttp3.CookieJar
    • loadForRequest

      public List<okhttp3.Cookie> loadForRequest(okhttp3.HttpUrl url)
      Specified by:
      loadForRequest in interface okhttp3.CookieJar