Package io.servicetalk.http.api
Class HeaderUtils.CookiesByNameIterator
- java.lang.Object
-
- io.servicetalk.http.api.HeaderUtils.CookiesByNameIterator
-
- All Implemented Interfaces:
java.util.Iterator<HttpCookiePair>
- Enclosing class:
- HeaderUtils
public abstract static class HeaderUtils.CookiesByNameIterator extends java.lang.Object implements java.util.Iterator<HttpCookiePair>
AnIterator
ofHttpCookiePair
designed to iterate across multiple values ofHttpHeaderNames.COOKIE
for a specificcookie-name
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CookiesByNameIterator(java.lang.CharSequence cookiePairName)
Create a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
advanceCookieHeaderValue()
Advance thecookieHeaderValue()
to the nextHttpHeaderNames.COOKIE
header value.protected abstract java.lang.CharSequence
cookieHeaderValue()
Get the current value forHttpHeaderNames.COOKIE
.boolean
hasNext()
protected void
initNext(java.lang.CharSequence cookieHeaderValue)
Initialize the nextHttpCookiePair
value fornext()
.HttpCookiePair
next()
-
-
-
Constructor Detail
-
CookiesByNameIterator
protected CookiesByNameIterator(java.lang.CharSequence cookiePairName)
Create a new instance.- Parameters:
cookiePairName
- Each return value ofnext()
will haveHttpCookiePair.name()
equivalent to this value.
-
-
Method Detail
-
hasNext
public final boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<HttpCookiePair>
-
next
public final HttpCookiePair next()
- Specified by:
next
in interfacejava.util.Iterator<HttpCookiePair>
-
cookieHeaderValue
@Nullable protected abstract java.lang.CharSequence cookieHeaderValue()
Get the current value forHttpHeaderNames.COOKIE
. This value may change during iteration.- Returns:
- the current value for
HttpHeaderNames.COOKIE
, ornull
if all have been iterated.
-
advanceCookieHeaderValue
protected abstract void advanceCookieHeaderValue()
Advance thecookieHeaderValue()
to the nextHttpHeaderNames.COOKIE
header value.
-
initNext
protected final void initNext(java.lang.CharSequence cookieHeaderValue)
Initialize the nextHttpCookiePair
value fornext()
.- Parameters:
cookieHeaderValue
- The initial value forHttpHeaderNames.COOKIE
.
-
-