Class Cookie
java.lang.Object
com.meterware.httpunit.cookies.Cookie
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the domain to which this cookie may be sent.longgetName()Returns the name of this cookie.getPath()Returns the path to which this cookie is restricted.getValue()Returns the value associated with this cookie.inthashCode()booleancheck whether the cookie is expiredbooleanmayBeSentTo(URL url) may this cookie be sent to the given url?voidSets 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
-
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
-