Package org.wildfly.security.http.util
Class SimpleHttpServerCookie
- java.lang.Object
- 
- org.wildfly.security.http.util.SimpleHttpServerCookie
 
- 
- All Implemented Interfaces:
- HttpServerCookie
 
 public class SimpleHttpServerCookie extends Object implements HttpServerCookie A simple implementation ofHttpServerCookie.- Author:
- Darran Lofthouse
 
- 
- 
Constructor SummaryConstructors Constructor Description SimpleHttpServerCookie(String name, String value, String domain, int maxAge, String path, boolean secure, int version, boolean httpOnly)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDomain()Gets the domain name of this cookie.intgetMaxAge()Gets the maximum age in seconds of this Cookie.StringgetName()Returns the name of the cookie.StringgetPath()Returns the path on the server to which the browser returns this cookie.StringgetValue()Returns the current value of this cookie.intgetVersion()Returns the version of the protocol this cookie complies with.booleanisHttpOnly()Checks whether this cookie has been marked as HttpOnly.booleanisSecure()Returnstrueif the browser is sending cookies only over a secure protocol, orfalseif the browser can send cookies using any protocol.static HttpServerCookienewInstance(String name, String value, String domain, int maxAge, String path, boolean secure, int version, boolean httpOnly)
 
- 
- 
- 
Method Detail- 
getNamepublic String getName() Description copied from interface:HttpServerCookieReturns the name of the cookie.- Specified by:
- getNamein interface- HttpServerCookie
- Returns:
- the name of the cookie
 
 - 
getValuepublic String getValue() Description copied from interface:HttpServerCookieReturns the current value of this cookie.- Specified by:
- getValuein interface- HttpServerCookie
- Returns:
- the current value of this cookie
 
 - 
getDomainpublic String getDomain() Description copied from interface:HttpServerCookieGets the domain name of this cookie.- Specified by:
- getDomainin interface- HttpServerCookie
- Returns:
- the domain name of this cookie
 
 - 
getMaxAgepublic int getMaxAge() Description copied from interface:HttpServerCookieGets the maximum age in seconds of this Cookie.- Specified by:
- getMaxAgein interface- HttpServerCookie
- Returns:
- an integer specifying the maximum age of the cookie in seconds
 
 - 
getPathpublic String getPath() Description copied from interface:HttpServerCookieReturns the path on the server to which the browser returns this cookie.- Specified by:
- getPathin interface- HttpServerCookie
- Returns:
- a Stringspecifying a path on the server
 
 - 
isSecurepublic boolean isSecure() Description copied from interface:HttpServerCookieReturnstrueif the browser is sending cookies only over a secure protocol, orfalseif the browser can send cookies using any protocol.- Specified by:
- isSecurein interface- HttpServerCookie
- Returns:
- trueif the browser uses a secure protocol,- falseotherwise
 
 - 
getVersionpublic int getVersion() Description copied from interface:HttpServerCookieReturns the version of the protocol this cookie complies with.- Specified by:
- getVersionin interface- HttpServerCookie
- Returns:
- the version of the protocol this cookie complies with.
 
 - 
isHttpOnlypublic boolean isHttpOnly() Description copied from interface:HttpServerCookieChecks whether this cookie has been marked as HttpOnly.- Specified by:
- isHttpOnlyin interface- HttpServerCookie
- Returns:
- true if this cookie has been marked as HttpOnly, false otherwise
 
 - 
newInstancepublic static HttpServerCookie newInstance(String name, String value, String domain, int maxAge, String path, boolean secure, int version, boolean httpOnly) 
 
- 
 
-