Top Description Fields Constructors Methods
io.netty.handler.codec.http.cookie

public final Class ServerCookieDecoder

extends CookieDecoder
Class Inheritance
Static Imports
io.netty.util.internal.ObjectUtil.checkNotNull

A RFC6265 compliant cookie decoder to be used server side. Only name and value fields are expected, so old fields are not populated (path, domain, etc). Old RFC2965 cookies are still supported, old fields will simply be ignored.
See Also
ServerCookieEncoder

Field Summary

Modifier and TypeField and Description
public static final ServerCookieDecoder
LAX

Lax instance that doesn't validate name and value

private static final String
private static final String
private static final String
private static final String
public static final ServerCookieDecoder
STRICT

Strict encoder that validates that name and value chars are in the valid scope defined in RFC6265

Constructor Summary

AccessConstructor and Description
private
ServerCookieDecoder(boolean strict)

Method Summary

Modifier and TypeMethod and Description
public Set<Cookie>

Returns:

the decoded Cookie
decode
(String header)

Decodes the specified Cookie HTTP header value into a Cookie.

private void
decode(Collection<? super Cookie> cookies, String header)

Decodes the specified Cookie HTTP header value into a Cookie.

public List<Cookie>

Returns:

the decoded Cookie
decodeAll
(String header)

Decodes the specified Cookie HTTP header value into a Cookie.

Inherited from io.netty.handler.codec.http.cookie.CookieDecoder:
initCookie

Field Detail

LAXback to summary
public static final ServerCookieDecoder LAX

Lax instance that doesn't validate name and value

RFC2965_DOMAINback to summary
private static final String RFC2965_DOMAIN
RFC2965_PATHback to summary
private static final String RFC2965_PATH
RFC2965_PORTback to summary
private static final String RFC2965_PORT
RFC2965_VERSIONback to summary
private static final String RFC2965_VERSION
STRICTback to summary
public static final ServerCookieDecoder STRICT

Strict encoder that validates that name and value chars are in the valid scope defined in RFC6265

Constructor Detail

ServerCookieDecoderback to summary
private ServerCookieDecoder(boolean strict)

Method Detail

decodeback to summary
public Set<Cookie> decode(String header)

Decodes the specified Cookie HTTP header value into a Cookie.

Returns:Set<Cookie>

the decoded Cookie

decodeback to summary
private void decode(Collection<? super Cookie> cookies, String header)

Decodes the specified Cookie HTTP header value into a Cookie.

decodeAllback to summary
public List<Cookie> decodeAll(String header)

Decodes the specified Cookie HTTP header value into a Cookie. Unlike decode(String), this includes all cookie values present, even if they have the same name.

Returns:List<Cookie>

the decoded Cookie