クラス MockCookie
java.lang.ObjectSE
jakarta.servlet.http.Cookie
org.springframework.mock.web.MockCookie
- 実装されているすべてのインターフェース:
SerializableSE, CloneableSE
public class MockCookie
extends jakarta.servlet.http.Cookie
- 導入:
- 5.1
- 作成者:
- Vedran Pavic, Juergen Hoeller, Sam Brannen
- 関連事項:
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明この Cookie の "Expires" 属性を取得します。この Cookie の "SameSite" 属性を取得します。booleanこの Cookie に "Partitioned" 属性 が設定されているかどうかを返します。static MockCookie提供された "Set-Cookie" ヘッダーの値を解析するファクトリメソッド。voidsetAttribute(StringSE name, @Nullable StringSE value) voidsetExpires(@Nullable ZonedDateTimeSE expires) この Cookie に "Expires" 属性を設定します。voidsetPartitioned(boolean partitioned) この Cookie に "Partitioned" 属性を設定します。voidsetSameSite(@Nullable StringSE sameSite) この Cookie に "SameSite" 属性を設定します。toString()クラス jakarta.servlet.http.Cookie から継承されたメソッド
clone, equals, getAttribute, getAttributes, getComment, getDomain, getMaxAge, getName, getPath, getSecure, getValue, getVersion, hashCode, isHttpOnly, setComment, setDomain, setHttpOnly, setMaxAge, setPath, setSecure, setValue, setVersion
コンストラクターの詳細
MockCookie
指定された名前と値を使用して新しいMockCookieを作成します。- パラメーター:
name- 名前value- 値- 関連事項:
メソッドの詳細
setExpires
getExpires
この Cookie の "Expires" 属性を取得します。- 戻り値:
- この Cookie の "Expires" 属性、または設定されていない場合は
null - 導入:
- 5.1.11
setSameSite
getSameSite
setPartitioned
public void setPartitioned(boolean partitioned) この Cookie に "Partitioned" 属性を設定します。- 導入:
- 6.2
- 関連事項:
isPartitioned
public boolean isPartitioned()この Cookie に "Partitioned" 属性 が設定されているかどうかを返します。- 導入:
- 6.2
- 関連事項:
parse
提供された "Set-Cookie" ヘッダーの値を解析するファクトリメソッド。- パラメーター:
setCookieHeader- "Set-Cookie" 値。決してnullまたは空- 戻り値:
- 作成された Cookie
setAttribute
toString
- オーバーライド:
- クラス
jakarta.servlet.http.CookieのtoString