Package Torello.Browser
Class Network.Cookie
- java.lang.Object
-
- Torello.Java.JSON.BaseType
-
- Torello.Browser.Network.Cookie
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- Network
public static class Network.Cookie extends BaseType implements java.io.Serializable
Cookie object- See Also:
- Serialized Form
Hi-Lited Source-Code:- View Here: Torello/Browser/Network.java
- Open New Browser-Tab: Torello/Browser/Network.java
File Size: 8,957 Bytes Line Count: 222 '\n' Characters Found
-
-
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
EXPERIMENTALboolean
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)
ConstructorCookie(JsonObject jo)
JSON Object Constructor
-
Method Summary
Generate Array that Indicates which Parameter are Optional Modifier and Type Method boolean[]
optionals()
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null.Methods: class java.lang.Object Modifier and Type Method boolean
equals(Object other)
Checks whether'this'
equals an input Java-Object
int
hashCode()
Generates a Hash-Code for'this'
instance
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
For Object Serialization. java.io.Serializable- See Also:
- Constant Field Values
-
name
public final java.lang.String name
Cookie name.
-
value
public final java.lang.String value
Cookie value.
-
domain
public final java.lang.String domain
Cookie domain.
-
path
public final java.lang.String path
Cookie path.
-
expires
public final java.lang.Number expires
Cookie expiration date as the number of seconds since the UNIX epoch.
-
size
public final int size
Cookie size.
-
httpOnly
public final boolean httpOnly
True if cookie is http-only.
-
secure
public final boolean secure
True if cookie is secure.
-
session
public final boolean session
True in case of session cookie.
-
sameSite
public final java.lang.String sameSite
Cookie SameSite type.
OPTIONAL
-
priority
public final java.lang.String priority
Cookie Priority
EXPERIMENTAL
-
sameParty
public final boolean sameParty
True if cookie is SameParty.
EXPERIMENTAL
-
sourceScheme
public final java.lang.String sourceScheme
Cookie source scheme type.
EXPERIMENTAL
-
sourcePort
public final int 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
-
-
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.
OPTIONALpriority
- Cookie Priority
EXPERIMENTALsameParty
- True if cookie is SameParty.
EXPERIMENTALsourceScheme
- Cookie source scheme type.
EXPERIMENTALsourcePort
- 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
-
Cookie
public Cookie(JsonObject jo)
JSON Object Constructor- Parameters:
jo
- A Json-Object having data about an instance of'Cookie'
.
-
-
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 aJsonObject
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 positionTRUE
.
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...
-
equals
public boolean equals(java.lang.Object other)
Checks whether'this'
equals an input Java-Object
- Overrides:
equals
in classjava.lang.Object
- Code:
- Exact Method Body:
if (other == null) return false; if (other.getClass() != this.getClass()) return false; Cookie o = (Cookie) other; return Objects.equals(this.name, o.name) && Objects.equals(this.value, o.value) && Objects.equals(this.domain, o.domain) && Objects.equals(this.path, o.path) && Objects.equals(this.expires, o.expires) && (this.size == o.size) && (this.httpOnly == o.httpOnly) && (this.secure == o.secure) && (this.session == o.session) && Objects.equals(this.sameSite, o.sameSite) && Objects.equals(this.priority, o.priority) && (this.sameParty == o.sameParty) && Objects.equals(this.sourceScheme, o.sourceScheme) && (this.sourcePort == o.sourcePort);
-
hashCode
public int hashCode()
Generates a Hash-Code for'this'
instance- Overrides:
hashCode
in classjava.lang.Object
- Code:
- Exact Method Body:
return Objects.hashCode(this.name) + Objects.hashCode(this.value) + Objects.hashCode(this.domain) + Objects.hashCode(this.path) + Objects.hashCode(this.expires) + this.size + (this.httpOnly ? 1 : 0) + (this.secure ? 1 : 0) + (this.session ? 1 : 0) + Objects.hashCode(this.sameSite) + Objects.hashCode(this.priority) + (this.sameParty ? 1 : 0) + Objects.hashCode(this.sourceScheme) + this.sourcePort;
-
-