Package jakarta.ws.rs.core
Class Cookie.Builder
- java.lang.Object
-
- jakarta.ws.rs.core.Cookie.AbstractCookieBuilder<Cookie.Builder>
-
- jakarta.ws.rs.core.Cookie.Builder
-
- Enclosing class:
- Cookie
public static class Cookie.Builder extends Cookie.AbstractCookieBuilder<Cookie.Builder>
JAX-RSCookie
builder class.Cookie builder provides methods that let you conveniently configure and subsequently build a new
For example:Cookie
instance.Cookie cookie = new Cookie.Builder("name") .path("/") .domain("domain.com") .build();
- Since:
- 3.1
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cookie
build()
Build a newCookie
instance using all the configuration previously specified in this builder.-
Methods inherited from class jakarta.ws.rs.core.Cookie.AbstractCookieBuilder
domain, path, value, version
-
-
-
-
Constructor Detail
-
Builder
public Builder(String name)
Create a new instance.- Parameters:
name
- the name of the cookie.
-
-
Method Detail
-
build
public Cookie build()
Description copied from class:Cookie.AbstractCookieBuilder
Build a newCookie
instance using all the configuration previously specified in this builder.- Specified by:
build
in classCookie.AbstractCookieBuilder<Cookie.Builder>
- Returns:
- a new
Cookie
instance.
-
-