org.apache.http.impl.cookie
Class RFC2965PortAttributeHandlerHC4

java.lang.Object
  extended by org.apache.http.impl.cookie.RFC2965PortAttributeHandlerHC4
All Implemented Interfaces:
org.apache.http.cookie.CookieAttributeHandler

@Immutable
public class RFC2965PortAttributeHandlerHC4
extends java.lang.Object
implements org.apache.http.cookie.CookieAttributeHandler

"Port" cookie attribute handler for RFC 2965 cookie spec.

Since:
4.0

Constructor Summary
RFC2965PortAttributeHandlerHC4()
           
 
Method Summary
 boolean match(org.apache.http.cookie.Cookie cookie, org.apache.http.cookie.CookieOrigin origin)
          Match cookie port attribute.
 void parse(org.apache.http.cookie.SetCookie cookie, java.lang.String portValue)
          Parse cookie port attribute.
 void validate(org.apache.http.cookie.Cookie cookie, org.apache.http.cookie.CookieOrigin origin)
          Validate cookie port attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RFC2965PortAttributeHandlerHC4

public RFC2965PortAttributeHandlerHC4()
Method Detail

parse

public void parse(org.apache.http.cookie.SetCookie cookie,
                  java.lang.String portValue)
           throws org.apache.http.cookie.MalformedCookieException
Parse cookie port attribute.

Specified by:
parse in interface org.apache.http.cookie.CookieAttributeHandler
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
Validate cookie port attribute. If the Port attribute was specified in header, the request port must be in cookie's port list.

Specified by:
validate in interface org.apache.http.cookie.CookieAttributeHandler
Throws:
org.apache.http.cookie.MalformedCookieException

match

public boolean match(org.apache.http.cookie.Cookie cookie,
                     org.apache.http.cookie.CookieOrigin origin)
Match cookie port attribute. If the Port attribute is not specified in header, the cookie can be sent to any port. Otherwise, the request port must be in the cookie's port list.

Specified by:
match in interface org.apache.http.cookie.CookieAttributeHandler