org.refcodes.mixin.DomainAccessor
, org.refcodes.mixin.DomainAccessor.DomainBuilder<String>
, org.refcodes.mixin.DomainAccessor.DomainMutator
, org.refcodes.mixin.DomainAccessor.DomainProperty
, org.refcodes.mixin.KeyAccessor<String>
, org.refcodes.mixin.KeyAccessor.KeyBuilder<String,String>
, org.refcodes.mixin.KeyAccessor.KeyMutator<String>
, org.refcodes.mixin.KeyAccessor.KeyProperty<String>
, org.refcodes.mixin.PathAccessor
, org.refcodes.mixin.PathAccessor.PathBuilder<String>
, org.refcodes.mixin.PathAccessor.PathMutator
, org.refcodes.mixin.PathAccessor.PathProperty
, org.refcodes.mixin.ValueAccessor<String>
, org.refcodes.mixin.ValueAccessor.ValueBuilder<String,String>
, org.refcodes.mixin.ValueAccessor.ValueMutator<String>
, org.refcodes.mixin.ValueAccessor.ValueProperty<String>
, Cookie
, ResponseCookie
, org.refcodes.structure.Property
, org.refcodes.structure.Property.PropertyBuilder
, org.refcodes.structure.Relation<String,String>
, org.refcodes.structure.Relation.RelationBuilder<String,String>
public class ResponseCookieImpl extends org.refcodes.structure.PropertyImpl.PropertyBuilderImpl implements ResponseCookie
org.refcodes.mixin.DomainAccessor.DomainBuilder<B extends org.refcodes.mixin.DomainAccessor.DomainBuilder<?>>, org.refcodes.mixin.DomainAccessor.DomainMutator, org.refcodes.mixin.DomainAccessor.DomainProperty
org.refcodes.mixin.KeyAccessor.KeyBuilder<K extends Object,B extends org.refcodes.mixin.KeyAccessor.KeyBuilder<K,B>>, org.refcodes.mixin.KeyAccessor.KeyMutator<K extends Object>, org.refcodes.mixin.KeyAccessor.KeyProperty<K extends Object>
org.refcodes.mixin.PathAccessor.PathBuilder<B extends org.refcodes.mixin.PathAccessor.PathBuilder<?>>, org.refcodes.mixin.PathAccessor.PathMutator, org.refcodes.mixin.PathAccessor.PathProperty
org.refcodes.structure.Property.PropertyBuilder
org.refcodes.structure.PropertyImpl.PropertyBuilderImpl
org.refcodes.structure.Relation.RelationBuilder<K extends Object,V extends Object>
org.refcodes.structure.RelationImpl.RelationBuilderImpl<K extends Object,V extends Object>
org.refcodes.mixin.ValueAccessor.ValueBuilder<V extends Object,B extends org.refcodes.mixin.ValueAccessor.ValueBuilder<V,B>>, org.refcodes.mixin.ValueAccessor.ValueMutator<V extends Object>, org.refcodes.mixin.ValueAccessor.ValueProperty<V extends Object>
Constructor | Description |
---|---|
ResponseCookieImpl() |
Instantiates a new response cookie impl.
|
ResponseCookieImpl(String aHttpCookie) |
Constructs a
ResponseCookie from the given HTTP cookie. |
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 . |
ResponseCookieImpl(Cookie aCookie) |
Constructs a
ResponseCookie . |
Modifier and Type | Method | Description |
---|---|---|
String |
getDomain() |
|
Date |
getExpiresDate() |
Returns the expiration date of this
ResponseCookie . |
String |
getPath() |
|
boolean |
isHttpOnly() |
Returns true if we have an HTTP only cookie.
|
boolean |
isSecure() |
Returns true if we have a secure HTTP cookie.
|
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) |
Sets the expiration date of this cookie.
|
void |
setHttpOnly(boolean isHttpOnly) |
Sets whether it be an HTTP only cookie.
|
void |
setPath(String aPath) |
|
void |
setSecure(boolean isSecure) |
Sets whether it be a secure HTTP cookie.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setKey, setValue
fromHttpCookie, 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
from the given HTTP cookie.aHttpCookie
- The text as being found in the according HTTP header
field.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()
ResponseCookie
.getExpiresDate
in interface ResponseCookie
public void setExpiresDate(Date aExpireDate)
setExpiresDate
in interface ResponseCookie
aExpireDate
- The expiration date.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
isSecure
- True in case of being a secure only cookie.public boolean isSecure()
isSecure
in interface ResponseCookie
public boolean isHttpOnly()
isHttpOnly
in interface ResponseCookie
public void setHttpOnly(boolean isHttpOnly)
setHttpOnly
in interface ResponseCookie
isHttpOnly
- True in case of being an HTTP only cookie.public void setExpiresAfter(org.refcodes.time.TimeUnit aTimeUnit, long aTime)
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 expirepublic String toString()
toString
in class org.refcodes.structure.PropertyImpl.PropertyBuilderImpl
Copyright © 2018. All rights reserved.