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>
AnIteratorofHttpCookiePairdesigned to iterate across multiple values ofHttpHeaderNames.COOKIEfor a specificcookie-name.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCookiesByNameIterator(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 voidadvanceCookieHeaderValue()Advance thecookieHeaderValue()to the nextHttpHeaderNames.COOKIEheader value.protected abstract java.lang.CharSequencecookieHeaderValue()Get the current value forHttpHeaderNames.COOKIE.booleanhasNext()protected voidinitNext(java.lang.CharSequence cookieHeaderValue)Initialize the nextHttpCookiePairvalue fornext().HttpCookiePairnext()
-
-
-
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:
hasNextin interfacejava.util.Iterator<HttpCookiePair>
-
next
public final HttpCookiePair next()
- Specified by:
nextin 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, ornullif all have been iterated.
-
advanceCookieHeaderValue
protected abstract void advanceCookieHeaderValue()
Advance thecookieHeaderValue()to the nextHttpHeaderNames.COOKIEheader value.
-
initNext
protected final void initNext(java.lang.CharSequence cookieHeaderValue)
Initialize the nextHttpCookiePairvalue fornext().- Parameters:
cookieHeaderValue- The initial value forHttpHeaderNames.COOKIE.
-
-