public class ResponseCookieImpl extends org.refcodes.collection.impls.PropertyImpl implements ResponseCookie
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>
Constructor and Description |
---|
ResponseCookieImpl() |
ResponseCookieImpl(Cookie aCookie)
Constructs a
ResponseCookie . |
ResponseCookieImpl(String aHttpCookie)
Constructs a
ResponseCookie . |
ResponseCookieImpl(String aCookieName,
String aValue)
Constructs a
ResponseCookie . |
ResponseCookieImpl(String aCookieName,
String aValue,
Date aExpiresDate,
String aDomain,
String aPath,
boolean isSecure,
boolean isHttpOnly)
Constructs a
ResponseCookie . |
Modifier and Type | Method and Description |
---|---|
String |
getDomain() |
Date |
getExpiresDate() |
String |
getPath() |
boolean |
isHttpOnly() |
boolean |
isSecure() |
void |
setDomain(String aDomain) |
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 |
setPath(String aPath) |
void |
setSecure(boolean isSecure) |
toString, withKey, withValue
getKey, getValue, setKey, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setCookie, toHttpCookie, withDomain, withExpiresAfter, withExpiresDate, withHttpCookie, withHttpOnly, withPath, withSecure
public ResponseCookieImpl()
public ResponseCookieImpl(String aCookieName, String aValue)
ResponseCookie
.aCookieName
- The name of the cookie.aValue
- The value for the cookie.public ResponseCookieImpl(String aHttpCookie)
ResponseCookie
.aHttpCookie
- The text as being found in the according HTTP header
field.ParseException
- Thrown in case parsing a value such as a date
failed.public ResponseCookieImpl(Cookie aCookie)
ResponseCookie
.aCookie
- The Cookie
from which to take the data.public ResponseCookieImpl(String aCookieName, String aValue, Date aExpiresDate, String aDomain, String aPath, boolean isSecure, boolean isHttpOnly)
ResponseCookie
.aCookieName
- The name for the cookieaValue
- The value of the cookieaExpiresDate
- The expiration date of the cookieaDomain
- The domain of the cookieaPath
- The path of the cookieisSecure
- The secure flag of the cookieisHttpOnly
- The HTTP-only flog of the cookiepublic String getPath()
getPath
in interface org.refcodes.mixin.PathAccessor
public void setPath(String aPath)
setPath
in interface org.refcodes.mixin.PathAccessor.PathMutator
public Date getExpiresDate()
getExpiresDate
in interface ResponseCookie
public void setExpiresDate(Date aExpireDate)
setExpiresDate
in interface ResponseCookie
public String getDomain()
getDomain
in interface org.refcodes.mixin.DomainAccessor
public void setDomain(String aDomain)
setDomain
in interface org.refcodes.mixin.DomainAccessor.DomainMutator
public void setSecure(boolean isSecure)
setSecure
in interface ResponseCookie
public boolean isSecure()
isSecure
in interface ResponseCookie
public boolean isHttpOnly()
isHttpOnly
in interface ResponseCookie
public void setHttpOnly(boolean isHttpOnly)
setHttpOnly
in interface ResponseCookie
public void setExpiresAfter(org.refcodes.time.TimeUnit aTimeUnit, long aTime)
ResponseCookie
ResponseCookie.getExpiresDate()
to retrieve the resulting effective
Date
.setExpiresAfter
in interface ResponseCookie
aTimeUnit
- The TimeUnit
of the provided timeaTime
- The provided time after which to expireCopyright © 2016. All rights reserved.