public interface ResponseCookie extends Cookie, org.refcodes.mixin.PathAccessor.PathProperty, org.refcodes.mixin.PathAccessor.PathBuilder<ResponseCookie>, org.refcodes.mixin.DomainAccessor.DomainProperty, org.refcodes.mixin.DomainAccessor.DomainBuilder<ResponseCookie>
ResponseCookie
is builder for building response cookies.org.refcodes.mixin.KeyAccessor.KeyBuilder<K,B extends org.refcodes.mixin.KeyAccessor.KeyBuilder<K,B>>, org.refcodes.mixin.KeyAccessor.KeyMutator<K>, org.refcodes.mixin.KeyAccessor.KeyProperty<K>
org.refcodes.mixin.ValueAccessor.ValueBuilder<V,B extends org.refcodes.mixin.ValueAccessor.ValueBuilder<V,B>>, org.refcodes.mixin.ValueAccessor.ValueMutator<V>, org.refcodes.mixin.ValueAccessor.ValueProperty<V>
Modifier and Type | Method and Description |
---|---|
Date |
getExpiresDate() |
boolean |
isHttpOnly() |
boolean |
isSecure() |
default void |
setCookie(String aCookie)
Sets the cookie according to the provided HTP cookie text.
|
void |
setExpiresAfter(org.refcodes.time.TimeUnit aTimeUnit,
long aTime)
Sets the expires date to the current time plus the provided time.
|
void |
setExpiresDate(Date aExpireDate) |
void |
setHttpOnly(boolean isHttpOnly) |
void |
setSecure(boolean isSecure) |
default String |
toHttpCookie()
Returns the cookie to be assigned to a cookie header field to be sent by
a server to a client.
|
default ResponseCookie |
withDomain(String aDomain) |
default ResponseCookie |
withExpiresAfter(org.refcodes.time.TimeUnit aTimeUnit,
long aTime)
Builder method for the method
setExpiresAfter(TimeUnit, long) . |
default ResponseCookie |
withExpiresDate(Date aExpiresDate) |
default ResponseCookie |
withHttpCookie(String aCookie)
Sets the cookie according to the provided HTP cookie text.
|
default ResponseCookie |
withHttpOnly(boolean isHttpOnly) |
default ResponseCookie |
withPath(String aPath) |
default ResponseCookie |
withSecure(boolean isSecure) |
void setExpiresAfter(org.refcodes.time.TimeUnit aTimeUnit, long aTime)
getExpiresDate()
to retrieve the resulting effective
Date
.aTimeUnit
- The TimeUnit
of the provided timeaTime
- The provided time after which to expiredefault ResponseCookie withExpiresAfter(org.refcodes.time.TimeUnit aTimeUnit, long aTime)
setExpiresAfter(TimeUnit, long)
.aTimeUnit
- The TimeUnit
of the provided timeaTime
- The provided time after which to expireResponseCookie
instance for further configuration.Date getExpiresDate()
void setExpiresDate(Date aExpireDate)
default ResponseCookie withExpiresDate(Date aExpiresDate)
default ResponseCookie withPath(String aPath)
withPath
in interface org.refcodes.mixin.PathAccessor.PathBuilder<ResponseCookie>
default ResponseCookie withDomain(String aDomain)
withDomain
in interface org.refcodes.mixin.DomainAccessor.DomainBuilder<ResponseCookie>
boolean isHttpOnly()
void setHttpOnly(boolean isHttpOnly)
default ResponseCookie withHttpOnly(boolean isHttpOnly)
boolean isSecure()
void setSecure(boolean isSecure)
default ResponseCookie withSecure(boolean isSecure)
default void setCookie(String aCookie)
Cookie
default ResponseCookie withHttpCookie(String aCookie)
Cookie
withHttpCookie
in interface Cookie
aCookie
- The HTTP cookie text.Cookie
instance as of the builder pattern.default String toHttpCookie()
Cookie
toHttpCookie
in interface Cookie
Copyright © 2016. All rights reserved.