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.CharSequence
encoded()
Get the encoded value of thisHttpCookiePair
.boolean
equals(java.lang.Object o)
int
hashCode()
boolean
isWrapped()
Returnstrue
if the value should be wrapped in DQUOTE as described in cookie-value.java.lang.CharSequence
name()
Returns the name of thisHttpCookiePair
.java.lang.String
toString()
java.lang.CharSequence
value()
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
-true
if the value should be wrapped in DQUOTE as described in cookie-value
-
-
Method Detail
-
name
public java.lang.CharSequence name()
Description copied from interface:HttpCookiePair
Returns the name of thisHttpCookiePair
.- Specified by:
name
in interfaceHttpCookiePair
- Returns:
- The name of this
HttpCookiePair
-
value
public java.lang.CharSequence value()
Description copied from interface:HttpCookiePair
Returns the value of thisHttpCookiePair
.- Specified by:
value
in interfaceHttpCookiePair
- Returns:
- The value of this
HttpCookiePair
-
isWrapped
public boolean isWrapped()
Description copied from interface:HttpCookiePair
Returnstrue
if the value should be wrapped in DQUOTE as described in cookie-value.- Specified by:
isWrapped
in interfaceHttpCookiePair
- Returns:
true
if the value should be wrapped in DQUOTE as described in cookie-value.
-
encoded
public java.lang.CharSequence encoded()
Description copied from interface:HttpCookiePair
Get the encoded value of thisHttpCookiePair
.- Specified by:
encoded
in interfaceHttpCookiePair
- Returns:
- the encoded value of this
HttpCookiePair
.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-