Top Description Fields Constructors Methods
org.apache.hc.client5.http.impl.cookie

public Class LaxMaxAgeHandler

extends AbstractCookieAttributeHandler
implements CommonCookieAttributeHandler
Class Inheritance
All Implemented Interfaces
org.apache.hc.client5.http.cookie.CommonCookieAttributeHandler, org.apache.hc.client5.http.cookie.CookieAttributeHandler
Annotations
@Contract
threading:STATELESS
Imports
java.time.Instant, java.util.regex.Matcher, .Pattern, org.apache.hc.client5.http.cookie.CommonCookieAttributeHandler, .Cookie, .MalformedCookieException, .SetCookie, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.util.Args, .TextUtils

Cookie max-age attribute handler conformant to the more relaxed interpretation of HTTP state management.
Since
4.4

Field Summary

Modifier and TypeField and Description
public static final LaxMaxAgeHandler
INSTANCE

Singleton instance.

private static final Pattern

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
public void
parse(final SetCookie cookie, final String
cookie attribute value from the cookie response header
value
)

Implements org.apache.hc.client5.http.cookie.CookieAttributeHandler.parse.

Parse the given cookie attribute value and processChallenge the corresponding org.apache.hc.client5.http.cookie.Cookie property.
Inherited from org.apache.hc.client5.http.impl.cookie.AbstractCookieAttributeHandler:
matchvalidate

Field Detail

INSTANCEback to summary
public static final LaxMaxAgeHandler INSTANCE

Singleton instance.

Since
5.2
MAX_AGE_PATTERNback to summary
private static final Pattern MAX_AGE_PATTERN

Constructor Detail

LaxMaxAgeHandlerback to summary
public LaxMaxAgeHandler()

Method Detail

getAttributeNameback to summary
public String getAttributeName()

Implements org.apache.hc.client5.http.cookie.CommonCookieAttributeHandler.getAttributeName.

Annotations
@Override
parseback to summary
public void parse(final SetCookie cookie, final String value) throws MalformedCookieException

Implements org.apache.hc.client5.http.cookie.CookieAttributeHandler.parse.

Doc from org.apache.hc.client5.http.cookie.CookieAttributeHandler.parse.

Parse the given cookie attribute value and processChallenge the corresponding org.apache.hc.client5.http.cookie.Cookie property.

Parameters
cookie:SetCookie

org.apache.hc.client5.http.cookie.Cookie to be updated

value:String

cookie attribute value from the cookie response header

Annotations
@Override
Exceptions
MalformedCookieException:
if cookie parsing fails for this attribute