Klasse Cookie

java.lang.Object
de.srsoftware.tools.Cookie
Alle implementierten Schnittstellen:
Map.Entry<String,String>
Bekannte direkte Unterklassen:
SessionToken

public abstract class Cookie extends Object implements Map.Entry<String,String>
This class allows to add cookies to a header object
  • Methodendetails

    • addTo

      public <T extends Cookie> T addTo(Headers headers)
      add this cookie instance to a Headers object
      Typparameter:
      T - the type of this cookie
      Parameter:
      headers - the headers object, to which this cookie is added
      Gibt zurück:
      this cookie
    • addTo

      public <T extends Cookie> T addTo(HttpExchange ex)
      add this cookie instance to a Headers object
      Typparameter:
      T - the type of this cookie
      Parameter:
      ex - the HttpExchange object, to which this cookie is added
      Gibt zurück:
      this cookie
    • getKey

      public String getKey()
      Angegeben von:
      getKey in Schnittstelle Map.Entry<String,String>
    • getValue

      public String getValue()
      Angegeben von:
      getValue in Schnittstelle Map.Entry<String,String>
    • of

      protected static List<String> of(HttpExchange ex)
      list the cookies of a given HttpExchange object
      Parameter:
      ex - the HttpExchange object
      Gibt zurück:
      the list of cookies
    • setValue

      public String setValue(String s)
      Angegeben von:
      setValue in Schnittstelle Map.Entry<String,String>