Package com.meterware.httpunit.cookies
Class Cookie
java.lang.Object
com.meterware.httpunit.cookies.Cookie
An HTTP client-side cookie.
- Author:
- Russell Gold
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the domain to which this cookie may be sent.long
getName()
Returns the name of this cookie.getPath()
Returns the path to which this cookie is restricted.getValue()
Returns the value associated with this cookie.int
hashCode()
boolean
check whether the cookie is expiredboolean
mayBeSentTo
(URL url) may this cookie be sent to the given url?void
Sets the value associated with this cookie.
-
Method Details
-
getExpiredTime
public long getExpiredTime()- Returns:
- the _expiredTime in milliseconds
-
getName
Returns the name of this cookie. -
getValue
Returns the value associated with this cookie. -
setValue
Sets the value associated with this cookie. -
getPath
Returns the path to which this cookie is restricted. -
getDomain
Returns the domain to which this cookie may be sent. -
hashCode
public int hashCode() -
equals
-
isExpired
public boolean isExpired()check whether the cookie is expired- Returns:
- true if the _expiredTime is higher than the current System time
-
mayBeSentTo
may this cookie be sent to the given url?- Parameters:
url
- - the unform resource locator to check- Returns:
- true if the cookie is not expired and the path is accepted if a domain is set
-