Package com.unblu.sdk.core.configuration
Class UnbluCookie
- java.lang.Object
-
- com.unblu.sdk.core.configuration.UnbluCookie
-
public class UnbluCookie extends java.lang.Object
Cookie representation for the Unblu sdkused together with the
UnbluClientConfiguration.Builder.setCustomCookies(Set)
of the configuration
-
-
Constructor Summary
Constructors Constructor Description UnbluCookie(java.lang.String key, java.lang.String value)
constructs UnbluCookie object from parameters expires parameter is desregarded because the cookie does not expireUnbluCookie(java.lang.String key, java.lang.String value, java.util.Date expires)
constructs UnbluCookie object from parametersUnbluCookie(java.net.HttpCookie cookie)
constructs UnbluCookie object from a java.net.HttpCookie object
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
static java.util.Set<UnbluCookie>
from(java.util.List<java.net.HttpCookie> cookies)
Creates Set<UnbluCookie> from Set<java.net.HttpCookie>static java.util.Set<UnbluCookie>
from(java.util.Map<java.lang.String,java.lang.String> cookies)
Creates UnbluCookie from Map<String, String>
these cookies will never expirejava.util.Date
getExpires()
java.lang.String
getKey()
java.lang.String
getValue()
int
hashCode()
-
-
-
Constructor Detail
-
UnbluCookie
public UnbluCookie(@NonNull java.net.HttpCookie cookie)
constructs UnbluCookie object from a java.net.HttpCookie object- Parameters:
cookie
- the java.net.HttpCookie object
-
UnbluCookie
public UnbluCookie(@NonNull java.lang.String key, @NonNull java.lang.String value, @Nullable java.util.Date expires)
constructs UnbluCookie object from parameters- Parameters:
key
- the cookie keyvalue
- the cookie valueexpires
- the cookie Expires parameter
-
UnbluCookie
public UnbluCookie(@NonNull java.lang.String key, @NonNull java.lang.String value)
constructs UnbluCookie object from parameters expires parameter is desregarded because the cookie does not expire- Parameters:
key
- the cookie keyvalue
- the cookie value
-
-
Method Detail
-
getKey
@NonNull public java.lang.String getKey()
- Returns:
- the key of the cookie.
-
getValue
@Nullable public java.lang.String getValue()
- Returns:
- the value of the cookie.
-
getExpires
@Nullable public java.util.Date getExpires()
- Returns:
- the value of the cookie Expires.
-
from
public static java.util.Set<UnbluCookie> from(@NonNull java.util.Map<java.lang.String,java.lang.String> cookies)
Creates UnbluCookie from Map<String, String>
these cookies will never expire- Parameters:
cookies
- The Custom cookie Map<key,value>- Returns:
Set
-
from
public static java.util.Set<UnbluCookie> from(@NonNull java.util.List<java.net.HttpCookie> cookies)
Creates Set<UnbluCookie> from Set<java.net.HttpCookie>- Parameters:
cookies
- The HttpCookie List<HttpCookie>- Returns:
Set
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-