Package io.servicetalk.http.api
Class DefaultHttpCookiePair
- java.lang.Object
-
- io.servicetalk.http.api.DefaultHttpCookiePair
-
- All Implemented Interfaces:
HttpCookiePair
public final class DefaultHttpCookiePair extends java.lang.Object implements HttpCookiePair
Default implementation ofHttpCookiePair.
-
-
Constructor Summary
Constructors Constructor Description DefaultHttpCookiePair(java.lang.CharSequence cookieName, java.lang.CharSequence cookieValue)Create a new instance.DefaultHttpCookiePair(java.lang.CharSequence cookieName, java.lang.CharSequence cookieValue, boolean isWrapped)Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.CharSequenceencoded()Get the encoded value of thisHttpCookiePair.booleanequals(java.lang.Object o)inthashCode()booleanisWrapped()Returnstrueif the value should be wrapped in DQUOTE as described in cookie-value.java.lang.CharSequencename()Returns the name of thisHttpCookiePair.java.lang.StringtoString()java.lang.CharSequencevalue()Returns the value of thisHttpCookiePair.
-
-
-
Constructor Detail
-
DefaultHttpCookiePair
public DefaultHttpCookiePair(java.lang.CharSequence cookieName, java.lang.CharSequence cookieValue)Create a new instance.- Parameters:
cookieName- The cookie-name.cookieValue- The cookie-value.
-
DefaultHttpCookiePair
public DefaultHttpCookiePair(java.lang.CharSequence cookieName, java.lang.CharSequence cookieValue, boolean isWrapped)Create a new instance.- Parameters:
cookieName- The cookie-name.cookieValue- The cookie-value.isWrapped-trueif the value should be wrapped in DQUOTE as described in cookie-value
-
-
Method Detail
-
name
public java.lang.CharSequence name()
Description copied from interface:HttpCookiePairReturns the name of thisHttpCookiePair.- Specified by:
namein interfaceHttpCookiePair- Returns:
- The name of this
HttpCookiePair
-
value
public java.lang.CharSequence value()
Description copied from interface:HttpCookiePairReturns the value of thisHttpCookiePair.- Specified by:
valuein interfaceHttpCookiePair- Returns:
- The value of this
HttpCookiePair
-
isWrapped
public boolean isWrapped()
Description copied from interface:HttpCookiePairReturnstrueif the value should be wrapped in DQUOTE as described in cookie-value.- Specified by:
isWrappedin interfaceHttpCookiePair- Returns:
trueif the value should be wrapped in DQUOTE as described in cookie-value.
-
encoded
public java.lang.CharSequence encoded()
Description copied from interface:HttpCookiePairGet the encoded value of thisHttpCookiePair.- Specified by:
encodedin interfaceHttpCookiePair- Returns:
- the encoded value of this
HttpCookiePair.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-