Package nablarch.fw.web
Class HttpCookie
Httpクッキーのパーサー及びその内容を保持するデータオブジェクト。
- Author:
- Iwauo Tajima <iwauo@tis.co.jp>
- 
Nested Class SummaryNested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionList<jakarta.servlet.http.Cookie>Cookieオブジェクトのリストに変換して返す。static HttpCookiefromServletCookie(jakarta.servlet.http.Cookie cookie) CookieからHttpCookieを生成する。static HttpCookiefromSetCookieHeader(String header) RFC6265に従い、Set-CookieヘッダをパースしてHttpCookieを生成する。HttpCookieはPath、Domain、Max-Age、Secure、HttpOnly属性のみをサポートしているため、それ以外の属性はパース時に無視する。このラッパーが処理を委譲するMapオブジェクトを返す。このクッキーが送信されるドメイン階層を返す。このクッキーの最長の存続期間(秒)を返す。(未設定の場合はnull)getPath()このクッキーが送信されるURIのパス階層を返す。booleanHttpOnly Cookieか否か。booleanisSecure()Secure Cookieか否か。このクッキーが送信されるドメイン階層を指定する。setHttpOnly(boolean httpOnly) HttpOnly Cookieか否かを設定する。このクッキーの最長の存続期間(秒)を指定する。このクッキーが送信されるURIのパス階層を指定する。setSecure(boolean secure) Secure Cookieか否かを設定する。Methods inherited from class nablarch.core.util.map.MapWrapperclear, containsKey, containsValue, entrySet, equals, get, getDelegateMapOfType, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, valuesMethods inherited from class java.util.AbstractMapcloneMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Constructor Details- 
HttpCookiepublic HttpCookie()デフォルトコンストラクタ。
 
- 
- 
Method Details- 
fromServletCookieCookieからHttpCookieを生成する。- Parameters:
- cookie- JavaEE サーブレットAPIのCookieオブジェクト
- Returns:
- HttpCookieオブジェクト
 
- 
fromSetCookieHeaderRFC6265に従い、Set-CookieヘッダをパースしてHttpCookieを生成する。HttpCookieはPath、Domain、Max-Age、Secure、HttpOnly属性のみをサポートしているため、それ以外の属性はパース時に無視する。- Parameters:
- header- Set-Cookieヘッダ(Set-Cookie: を含む)
- Returns:
- HttpCookieインスタンス
- See Also:
 
- 
getMaxAgeこのクッキーの最長の存続期間(秒)を返す。(未設定の場合はnull)- Returns:
- このクッキーの最長の存続期間(秒)
 
- 
setMaxAgeこのクッキーの最長の存続期間(秒)を指定する。- Parameters:
- maxAge- このクッキーの最長の存続期間(秒)
- Returns:
- このオブジェクト自体
 
- 
getPathこのクッキーが送信されるURIのパス階層を返す。- Returns:
- このクッキーが送信されるURI階層
 
- 
setPathこのクッキーが送信されるURIのパス階層を指定する。- Parameters:
- path- このクッキーが送信されるURI階層
- Returns:
- このオブジェクト自体
 
- 
getDomainこのクッキーが送信されるドメイン階層を返す。- Returns:
- このクッキーが送信されるドメイン階層
 
- 
setDomainこのクッキーが送信されるドメイン階層を指定する。- Parameters:
- domain- このクッキーが送信されるドメイン階層
- Returns:
- このオブジェクト自体
 
- 
isSecurepublic boolean isSecure()Secure Cookieか否か。- Returns:
- trueの場合は、Secure Cookie
 
- 
setSecureSecure Cookieか否かを設定する。- Parameters:
- secure- trueの場合は、Secure Cookie
 
- 
isHttpOnlypublic boolean isHttpOnly()HttpOnly Cookieか否か。- Returns:
- trueの場合は、HttpOnly Cookie
 
- 
setHttpOnlyHttpOnly Cookieか否かを設定する。- Parameters:
- httpOnly- trueの場合は、HttpOnly Cookie
- Returns:
- このオブジェクト自体
 
- 
convertServletCookiesCookieオブジェクトのリストに変換して返す。- Returns:
- Cookieリスト
 
- 
getDelegateMapDescription copied from class:MapWrapperこのラッパーが処理を委譲するMapオブジェクトを返す。- Specified by:
- getDelegateMapin class- MapWrapper<String,- String> 
- Returns:
- 処理を委譲するMapオブジェクト
 
 
-