Package org.sonar.api.server.http
Interface Cookie
-
public interface CookieFramework-agnostic definition of a cookie. Creates a cookie, a small amount of information sent by a servlet to a Web browser, saved by the browser, and later sent back to the server. A cookie's value can uniquely identify a client, so cookies are commonly used for session management.- Since:
- 9.16
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetMaxAge()Gets the maximum age in seconds of this Cookie.java.lang.StringgetName()Returns the name of the cookie.java.lang.StringgetPath()Returns the path on the server to which the browser returns this cookie.java.lang.StringgetValue()Gets the current value of this Cookie.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.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the name of the cookie. The name cannot be changed after creation.
-
getValue
java.lang.String getValue()
Gets the current value of this Cookie.
-
getPath
java.lang.String getPath()
Returns the path on the server to which the browser returns this cookie. The cookie is visible to all subpaths on the server.
-
isSecure
boolean isSecure()
Returnstrueif the browser is sending cookies only over a secure protocol, orfalseif the browser can send cookies using any protocol.
-
isHttpOnly
boolean isHttpOnly()
Checks whether this Cookie has been marked as HttpOnly.
-
getMaxAge
int getMaxAge()
Gets the maximum age in seconds of this Cookie.
-
-