Package io.netty.handler.codec.http
Class ServerCookieEncoder
- java.lang.Object
-
- io.netty.handler.codec.http.ServerCookieEncoder
-
@Deprecated public final class ServerCookieEncoder extends Object
Deprecated.UseServerCookieEncoder
insteadA RFC6265 compliant cookie encoder to be used server side, so some fields are sent (Version is typically ignored). As Netty's Cookie merges Expires and MaxAge into one single field, only Max-Age field is sent. Note that multiple cookies must be sent as separate "Set-Cookie" headers.// Example
HttpResponse
res = ...; res.setHeader("Set-Cookie",ServerCookieEncoder
.encode("JSESSIONID", "1234"));- See Also:
ServerCookieDecoder
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static String
encode(Cookie cookie)
Deprecated.static List<String>
encode(Cookie... cookies)
Deprecated.static List<String>
encode(Iterable<Cookie> cookies)
Deprecated.static String
encode(String name, String value)
Deprecated.static List<String>
encode(Collection<Cookie> cookies)
Deprecated.
-
-
-
Method Detail
-
encode
@Deprecated public static String encode(String name, String value)
Deprecated.Encodes the specified cookie name-value pair into a Set-Cookie header value.- Parameters:
name
- the cookie namevalue
- the cookie value- Returns:
- a single Set-Cookie header value
-
encode
@Deprecated public static String encode(Cookie cookie)
Deprecated.Encodes the specified cookie into a Set-Cookie header value.- Parameters:
cookie
- the cookie- Returns:
- a single Set-Cookie header value
-
encode
@Deprecated public static List<String> encode(Cookie... cookies)
Deprecated.Batch encodes cookies into Set-Cookie header values.- Parameters:
cookies
- a bunch of cookies- Returns:
- the corresponding bunch of Set-Cookie headers
-
encode
@Deprecated public static List<String> encode(Collection<Cookie> cookies)
Deprecated.Batch encodes cookies into Set-Cookie header values.- Parameters:
cookies
- a bunch of cookies- Returns:
- the corresponding bunch of Set-Cookie headers
-
encode
@Deprecated public static List<String> encode(Iterable<Cookie> cookies)
Deprecated.Batch encodes cookies into Set-Cookie header values.- Parameters:
cookies
- a bunch of cookies- Returns:
- the corresponding bunch of Set-Cookie headers
-
-