| Modifier and Type | Class and Description |
|---|---|
| public abstract static class | Cookie.
the current AbstractCookieBuilder type. T extends Cookie.JAX-RS abstract |
| public static class | Cookie.
JAX-RS |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | DEFAULT_VERSION
Cookies using the default version correspond to RFC 2109. |
| private final String | |
| private static final RuntimeDelegate. | HEADER_DELEGATE
Deprecated
This field will be removed in a future version. See https://github.com/jakartaee/rest/issues/607
|
| private final String | |
| private final String | |
| private final String | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | Cookie(final String
the name of the cookie. name, final String the value of the cookie. value, final String the URI path for which the cookie is valid. path, final String the host domain for which the cookie is valid. domain, final int the version of the specification to which the cookie complies. version)
Deprecated
This constructor will be removed in a future version. Please use
Cookie. instead.
Create a new instance. |
| public | Cookie(final String
the name of the cookie. name, final String the value of the cookie. value, final String the URI path for which the cookie is valid. path, final String the host domain for which the cookie is valid. domain)
Deprecated
This constructor will be removed in a future version. Please use
Cookie. instead.
Create a new instance. |
| public | Cookie(final String
the name of the cookie. name, final String the value of the cookie. value)
Deprecated
This constructor will be removed in a future version. Please use
Cookie. instead.
Create a new instance. |
| protected | Cookie(Cookie.
the builder. builderCreate a new instance from the supplied |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true, if the object is a Cookie with the same value for all properties, false
otherwise.the object to compare to. obj)Overrides java. Compare for equality. |
| public String | |
| public String | |
| public String | |
| public String | |
| public int | |
| public int | Returns: the cookie hash code.Overrides java. Generate a hash code by hashing all of the cookies properties. |
| public String | Returns: a stringified cookie.Overrides java.
Deprecated
The format of the toString() method is subject to change in a future version. Please use
RuntimeDelegate.getInstance().createHeaderDelegate(Cookie.class).toString(value) instead if you rely on the format of
this method.
Convert the cookie to a string suitable for use as the value of the corresponding HTTP header. |
| public static Cookie | Returns: the newly createdCookie.the cookie string. value)
Deprecated
This method will be removed in a future version. Please use
RuntimeDelegate.getInstance().createHeaderDelegate(Cookie.class).fromString(value) instead.
Creates a new instance of |
| DEFAULT_VERSION | back to summary |
|---|---|
| public static final int DEFAULT_VERSION Cookies using the default version correspond to RFC 2109. | |
| domain | back to summary |
|---|---|
| private final String domain | |
| HEADER_DELEGATE | back to summary |
|---|---|
| private static final RuntimeDelegate. Deprecated This field will be removed in a future version. See https://github.com/jakartaee/rest/issues/607 | |
| name | back to summary |
|---|---|
| private final String name | |
| path | back to summary |
|---|---|
| private final String path | |
| value | back to summary |
|---|---|
| private final String value | |
| version | back to summary |
|---|---|
| private final int version | |
| Cookie | back to summary |
|---|---|
| public Cookie(final String name, final String value, final String path, final String domain, final int version) throws IllegalArgumentException
Deprecated This constructor will be removed in a future version. Please use Create a new instance.
| |
| Cookie | back to summary |
|---|---|
| public Cookie(final String name, final String value, final String path, final String domain) throws IllegalArgumentException
Deprecated This constructor will be removed in a future version. Please use Create a new instance.
| |
| Cookie | back to summary |
|---|---|
| public Cookie(final String name, final String value) throws IllegalArgumentException
Deprecated This constructor will be removed in a future version. Please use Create a new instance.
| |
| Cookie | back to summary |
|---|---|
| protected Cookie(Cookie. Create a new instance from the supplied
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Compare for equality.
| |
| getDomain | back to summary |
|---|---|
| public String getDomain() Get the domain of the cookie.
| |
| getName | back to summary |
|---|---|
| public String getName() Get the name of the cookie.
| |
| getPath | back to summary |
|---|---|
| public String getPath() Get the path of the cookie.
| |
| getValue | back to summary |
|---|---|
| public String getValue() Get the value of the cookie.
| |
| getVersion | back to summary |
|---|---|
| public int getVersion() Get the version of the cookie.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Generate a hash code by hashing all of the cookies properties.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Deprecated The format of the toString() method is subject to change in a future version. Please use RuntimeDelegate.getInstance().createHeaderDelegate(Cookie.class).toString(value) instead if you rely on the format of this method. Convert the cookie to a string suitable for use as the value of the corresponding HTTP header.
| |
| valueOf | back to summary |
|---|---|
| public static Cookie valueOf(final String value)
Deprecated This method will be removed in a future version. Please use RuntimeDelegate.getInstance().createHeaderDelegate(Cookie.class).fromString(value) instead. Creates a new instance of
| |
Cookie builder class.
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private final String | |
| private String | |
| private String | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract Cookie | |
| public T | |
| public T | |
| private T | |
| public T | |
| public T | Returns: the updated builder instance.the version of the specification to which the cookie complies. version)Set the version of the cookie. |
| domain | back to summary |
|---|---|
| private String domain | |
| name | back to summary |
|---|---|
| private final String name | |
| path | back to summary |
|---|---|
| private String path | |
| value | back to summary |
|---|---|
| private String value | |
| version | back to summary |
|---|---|
| private int version | |
| AbstractCookieBuilder | back to summary |
|---|---|
| public AbstractCookieBuilder(String name) Create a new instance.
| |
| build | back to summary |
|---|---|
| public abstract Cookie build() Build a new
| |
| domain | back to summary |
|---|---|
| public T domain(String domain) Set the domain of the cookie.
| |
| path | back to summary |
|---|---|
| public T path(String path) Set the path of the cookie.
| |
| self | back to summary |
|---|---|
private T self()
| |
| value | back to summary |
|---|---|
| public T value(String value) Set the value of the cookie.
| |
| version | back to summary |
|---|---|
| public T version(int version) Set the version of the cookie. Defaults to
| |
Cookie builder class.
Cookie builder provides methods that let you conveniently configure and subsequently build a new
Cookie instance.
Cookie cookie = new Cookie.Builder("name")
.path("/")
.domain("domain.com")
.build();
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Cookie | build()
Implements abstract jakarta. Build a new |
| Builder | back to summary |
|---|---|
| public Builder(String name) Create a new instance.
| |
| build | back to summary |
|---|---|
| public Cookie build() Implements abstract jakarta. Doc from jakarta. Build a new | |