Package org.apache.tomcat.util.http
Class CookieProcessorBase
- java.lang.Object
-
- org.apache.tomcat.util.http.CookieProcessorBase
-
- All Implemented Interfaces:
CookieProcessor
- Direct Known Subclasses:
Rfc6265CookieProcessor
public abstract class CookieProcessorBase extends java.lang.Object implements CookieProcessor
Base implementation ofCookieProcessor.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringANCIENT_DATEA date far in the past used to expire cookies.protected static java.lang.ThreadLocal<java.text.DateFormat>COOKIE_DATE_FORMATThread-local date format for cookie dates.
-
Constructor Summary
Constructors Constructor Description CookieProcessorBase()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCookiesWithoutEquals()Get the current cookiesWithoutEquals setting as a string.protected CookiesWithoutEqualsgetCookiesWithoutEqualsInternal()Get the current cookiesWithoutEquals setting as an enum.booleangetPartitioned()Should thePartitionedattribute be added by default to cookies created for this web application.SameSiteCookiesgetSameSiteCookies()Get the current sameSiteCookies setting.voidsetCookiesWithoutEquals(java.lang.String cookiesWithoutEquals)Set the cookiesWithoutEquals setting.voidsetPartitioned(boolean partitioned)Configure whether thePartitionedattribute should be added by default to cookies created for this web application.voidsetSameSiteCookies(java.lang.String sameSiteCookies)Set the sameSiteCookies setting.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.tomcat.util.http.CookieProcessor
generateHeader, getCharset, parseCookieHeader
-
-
-
-
Method Detail
-
getCookiesWithoutEquals
public java.lang.String getCookiesWithoutEquals()
Get the current cookiesWithoutEquals setting as a string.- Returns:
- The cookiesWithoutEquals value
-
getCookiesWithoutEqualsInternal
protected CookiesWithoutEquals getCookiesWithoutEqualsInternal()
Get the current cookiesWithoutEquals setting as an enum.- Returns:
- The cookiesWithoutEquals value
-
setCookiesWithoutEquals
public void setCookiesWithoutEquals(java.lang.String cookiesWithoutEquals)
Set the cookiesWithoutEquals setting.- Parameters:
cookiesWithoutEquals- The new cookiesWithoutEquals value
-
getSameSiteCookies
public SameSiteCookies getSameSiteCookies()
Get the current sameSiteCookies setting.- Returns:
- The sameSiteCookies value
-
setSameSiteCookies
public void setSameSiteCookies(java.lang.String sameSiteCookies)
Set the sameSiteCookies setting.- Parameters:
sameSiteCookies- The new sameSiteCookies value
-
getPartitioned
public boolean getPartitioned()
Should thePartitionedattribute be added by default to cookies created for this web application.The name of the attribute used to indicate a partitioned cookie as part of CHIPS is not defined by an RFC and may change in a non-backwards compatible way once equivalent functionality is included in an RFC.
- Returns:
trueif thePartitionedattribute should be added by default to cookies created for this web application, otherwisefalse
-
setPartitioned
public void setPartitioned(boolean partitioned)
Configure whether thePartitionedattribute should be added by default to cookies created for this web application.The name of the attribute used to indicate a partitioned cookie as part of CHIPS is not defined by an RFC and may change in a non-backwards compatible way once equivalent functionality is included in an RFC.
- Parameters:
partitioned-trueif thePartitionedattribute should be added by default to cookies created for this web application, otherwisefalse
-
-