Class CookieHandler
java.lang.Object
hudson.plugins.performance.cookie.CookieHandler
Creates and converts cookies.
- Author:
- Ulli Hafner
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.servlet.http.Cookie
Sends a cookie with the specified value.getValue
(javax.servlet.http.Cookie[] cookies) Selects the correct cookie from the specified cookies and returns its value.
-
Constructor Details
-
CookieHandler
Creates a new instance ofCookieHandler
.- Parameters:
name
- the name of the cookie
-
-
Method Details
-
create
public javax.servlet.http.Cookie create(List<org.kohsuke.stapler.Ancestor> requestAncestors, String value) Sends a cookie with the specified value.- Parameters:
requestAncestors
- the ancestors of the requestvalue
- the cookie value- Returns:
- the created cookie
-
getValue
Selects the correct cookie from the specified cookies and returns its value. If there is no such cookie, then an empty string is returned.- Parameters:
cookies
- the cookies to scan- Returns:
- the cookie value or an empty string if the cookie is not found
-