org.apache.http.impl.cookie
Class BestMatchSpecHC4

java.lang.Object
  extended by org.apache.http.impl.cookie.BestMatchSpecHC4
All Implemented Interfaces:
org.apache.http.cookie.CookieSpec

@NotThreadSafe
public class BestMatchSpecHC4
extends java.lang.Object
implements org.apache.http.cookie.CookieSpec

'Meta' cookie specification that picks up a cookie policy based on the format of cookies sent with the HTTP response.

Since:
4.0

Constructor Summary
BestMatchSpecHC4()
           
BestMatchSpecHC4(java.lang.String[] datepatterns, boolean oneHeader)
           
 
Method Summary
 java.util.List<org.apache.http.Header> formatCookies(java.util.List<org.apache.http.cookie.Cookie> cookies)
           
 int getVersion()
           
 org.apache.http.Header getVersionHeader()
           
 boolean match(org.apache.http.cookie.Cookie cookie, org.apache.http.cookie.CookieOrigin origin)
           
 java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.Header header, org.apache.http.cookie.CookieOrigin origin)
           
 java.lang.String toString()
           
 void validate(org.apache.http.cookie.Cookie cookie, org.apache.http.cookie.CookieOrigin origin)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BestMatchSpecHC4

public BestMatchSpecHC4(java.lang.String[] datepatterns,
                        boolean oneHeader)

BestMatchSpecHC4

public BestMatchSpecHC4()
Method Detail

parse

public java.util.List<org.apache.http.cookie.Cookie> parse(org.apache.http.Header header,
                                                           org.apache.http.cookie.CookieOrigin origin)
                                                    throws org.apache.http.cookie.MalformedCookieException
Specified by:
parse in interface org.apache.http.cookie.CookieSpec
Throws:
org.apache.http.cookie.MalformedCookieException

validate

public void validate(org.apache.http.cookie.Cookie cookie,
                     org.apache.http.cookie.CookieOrigin origin)
              throws org.apache.http.cookie.MalformedCookieException
Specified by:
validate in interface org.apache.http.cookie.CookieSpec
Throws:
org.apache.http.cookie.MalformedCookieException

match

public boolean match(org.apache.http.cookie.Cookie cookie,
                     org.apache.http.cookie.CookieOrigin origin)
Specified by:
match in interface org.apache.http.cookie.CookieSpec

formatCookies

public java.util.List<org.apache.http.Header> formatCookies(java.util.List<org.apache.http.cookie.Cookie> cookies)
Specified by:
formatCookies in interface org.apache.http.cookie.CookieSpec

getVersion

public int getVersion()
Specified by:
getVersion in interface org.apache.http.cookie.CookieSpec

getVersionHeader

public org.apache.http.Header getVersionHeader()
Specified by:
getVersionHeader in interface org.apache.http.cookie.CookieSpec

toString

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