Google Data APIs Client Library (1.41.1)



com.google.gdata.client.http
Class GoogleGDataRequest.GoogleCookie

java.lang.Object
  extended by com.google.gdata.client.http.GoogleGDataRequest.GoogleCookie
Enclosing class:
GoogleGDataRequest

public static class GoogleGDataRequest.GoogleCookie
extends java.lang.Object

Google cookie.


Constructor Summary
GoogleGDataRequest.GoogleCookie(java.net.URI uri, java.lang.String cookieHeader)
          Constructs a new GoogleCookie instance.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true if the target object is a GoogleCookie that has the same name as this cookie and that matches the same target domain and path as this cookie.
 java.lang.String getDomain()
           
 java.util.Date getExpires()
           
 java.lang.String getName()
           
 java.lang.String getPath()
           
 boolean hasExpired()
          Returns true if the cookie has expired.
 int hashCode()
           
 boolean matches(java.net.URI uri)
          Returns true if the cookie hasn't expired, the URI domain matches, and the URI path starts with the cookie path.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GoogleGDataRequest.GoogleCookie

public GoogleGDataRequest.GoogleCookie(java.net.URI uri,
                                       java.lang.String cookieHeader)
Constructs a new GoogleCookie instance.

Parameters:
uri - the original request URI that returned Set-Cookie header in the response
cookieHeader - the value of the Set-Cookie header.
Method Detail

getDomain

public java.lang.String getDomain()

getPath

public java.lang.String getPath()

getName

public java.lang.String getName()

getExpires

public java.util.Date getExpires()

hasExpired

public boolean hasExpired()
Returns true if the cookie has expired.


matches

public boolean matches(java.net.URI uri)
Returns true if the cookie hasn't expired, the URI domain matches, and the URI path starts with the cookie path.

Parameters:
uri - URI to check against
Returns:
true if match, false otherwise

equals

public boolean equals(java.lang.Object o)
Returns true if the target object is a GoogleCookie that has the same name as this cookie and that matches the same target domain and path as this cookie. Cookie expiration and value are not taken into account when considering equivalence.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object