Class Network.Cookie

    • Field Summary

       
      Serializable ID
      Modifier and Type Field
      protected static long serialVersionUID
      For Object Serialization.
       
      Type Properties
      Modifier and Type Field
      String domain
      Cookie domain.
      Number expires
      Cookie expiration date as the number of seconds since the UNIX epoch.
      boolean httpOnly
      True if cookie is http-only.
      String name
      Cookie name.
      String path
      Cookie path.
      String priority
      Cookie Priority

      EXPERIMENTAL
      boolean sameParty
      True if cookie is SameParty.
      String sameSite
      Cookie SameSite type.
      boolean secure
      True if cookie is secure.
      boolean session
      True in case of session cookie.
      int size
      Cookie size.
      int sourcePort
      Cookie source port.
      String sourceScheme
      Cookie source scheme type.
      String value
      Cookie value.
    • Constructor Summary

      Constructors 
      Constructor Description
      Cookie​(String name, String value, String domain, String path, Number expires, int size, boolean httpOnly, boolean secure, boolean session, String sameSite, String priority, boolean sameParty, String sourceScheme, int sourcePort)
      Constructor
      Cookie​(JsonObject jo)
      JSON Object Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean[] optionals()
      Implementing this method allows sub-classes to specify which JSON Properties may be absent or null.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Cookie

        🡅  🡇     🗕  🗗  🗖
        public Cookie​(java.lang.String name,
                      java.lang.String value,
                      java.lang.String domain,
                      java.lang.String path,
                      java.lang.Number expires,
                      int size,
                      boolean httpOnly,
                      boolean secure,
                      boolean session,
                      java.lang.String sameSite,
                      java.lang.String priority,
                      boolean sameParty,
                      java.lang.String sourceScheme,
                      int sourcePort)
        Constructor
        Parameters:
        name - Cookie name.
        value - Cookie value.
        domain - Cookie domain.
        path - Cookie path.
        expires - Cookie expiration date as the number of seconds since the UNIX epoch.
        size - Cookie size.
        httpOnly - True if cookie is http-only.
        secure - True if cookie is secure.
        session - True in case of session cookie.
        sameSite - Cookie SameSite type.
        OPTIONAL
        priority - Cookie Priority
        EXPERIMENTAL
        sameParty - True if cookie is SameParty.
        EXPERIMENTAL
        sourceScheme - Cookie source scheme type.
        EXPERIMENTAL
        sourcePort - Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
        EXPERIMENTAL
    • Method Detail

      • optionals

        🡅     🗕  🗗  🗖
        public boolean[] optionals()
        Description copied from class: BaseType
        Implementing this method allows sub-classes to specify which JSON Properties may be absent or null. When binding a JsonObject to a Java-Object, if some of the expected fields for the Java-Object map to Properties which might be left-out or omitted, then that may be indicated by setting that fields array position TRUE.

        NOTE: This array should have a length equal to the number of fields contained by the Java Object. The first boolean in the array should specify whether the first Object Field may by absent. The second boolean should specify whether the second Object Field is optional in the JSON - and so on and so forth...
        Specified by:
        optionals in class BaseType
        Returns:
        A boolean[] array whose length is precisely equal to the number of fields in the Java Object.