java.lang.Object
de.codecentric.boot.admin.server.web.client.cookies.JdkPerInstanceCookieStore
All Implemented Interfaces:
PerInstanceCookieStore

public class JdkPerInstanceCookieStore extends Object implements PerInstanceCookieStore
A PerInstanceCookieStore that is using per Instance a CookieStore from JDK as back end store. As Cookie2 cookies are not recommended any more only Cookie cookies are supported.
  • Constructor Details

  • Method Details

    • get

      public org.springframework.util.MultiValueMap<String,String> get(InstanceId instanceId, URI requestUri, org.springframework.util.MultiValueMap<String,String> requestHeaders)
      Description copied from interface: PerInstanceCookieStore
      Gets all the applicable cookies (cookie name => string representation of cookie) for the given instanceId and the specified uri in the request header. The URI passed as an argument specifies the intended use for the cookies.
      Specified by:
      get in interface PerInstanceCookieStore
      Parameters:
      instanceId - identifies the web client instance
      requestUri - a URI representing the intended use for the cookies
      requestHeaders - a Map from request header field names to lists of field values representing the current request
      Returns:
      an immutable map from cookie names to text representations of cookies to be included into a request header
    • put

      public void put(InstanceId instanceId, URI requestUrl, org.springframework.util.MultiValueMap<String,String> headers)
      Description copied from interface: PerInstanceCookieStore
      Stores all the applicable cookies (examples are response header fields that are named Set-Cookie) present in the response headers.
      Specified by:
      put in interface PerInstanceCookieStore
      Parameters:
      instanceId - identifies the web client instance
      requestUrl - an URI where the cookies come from
      headers - a map from field names to lists of field values representing the response header fields
    • cleanupInstance

      public void cleanupInstance(InstanceId instanceId)
      Description copied from interface: PerInstanceCookieStore
      Informs the store that the cookies of the given instanceId could be removed.
      Specified by:
      cleanupInstance in interface PerInstanceCookieStore
      Parameters:
      instanceId - identifies the Instance
    • getCookieHandler

      protected CookieHandler getCookieHandler(InstanceId instanceId)
      Returns the stored CookieHandler for the identified Instance or creates a new one, stores and returns it.
      Parameters:
      instanceId - identifies the Instance
      Returns:
      CookieHandler responsible for the given instanceId
    • createCookieHandler

      protected CookieHandler createCookieHandler(InstanceId instanceId)