org.apache.http.impl.cookie
Class AbstractCookieSpecHC4

java.lang.Object
  extended by org.apache.http.impl.cookie.AbstractCookieSpecHC4
All Implemented Interfaces:
org.apache.http.cookie.CookieSpec
Direct Known Subclasses:
CookieSpecBaseHC4

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

Abstract cookie specification which can delegate the job of parsing, validation or matching cookie attributes to a number of arbitrary CookieAttributeHandlers.

Since:
4.0

Constructor Summary
AbstractCookieSpecHC4()
          Default constructor
 
Method Summary
protected  org.apache.http.cookie.CookieAttributeHandler findAttribHandler(java.lang.String name)
          Finds an attribute handler CookieAttributeHandler for the given attribute.
protected  org.apache.http.cookie.CookieAttributeHandler getAttribHandler(java.lang.String name)
          Gets attribute handler CookieAttributeHandler for the given attribute.
protected  java.util.Collection<org.apache.http.cookie.CookieAttributeHandler> getAttribHandlers()
           
 void registerAttribHandler(java.lang.String name, org.apache.http.cookie.CookieAttributeHandler handler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.http.cookie.CookieSpec
formatCookies, getVersion, getVersionHeader, match, parse, validate
 

Constructor Detail

AbstractCookieSpecHC4

public AbstractCookieSpecHC4()
Default constructor

Method Detail

registerAttribHandler

public void registerAttribHandler(java.lang.String name,
                                  org.apache.http.cookie.CookieAttributeHandler handler)

findAttribHandler

protected org.apache.http.cookie.CookieAttributeHandler findAttribHandler(java.lang.String name)
Finds an attribute handler CookieAttributeHandler for the given attribute. Returns null if no attribute handler is found for the specified attribute.

Parameters:
name - attribute name. e.g. Domain, Path, etc.
Returns:
an attribute handler or null

getAttribHandler

protected org.apache.http.cookie.CookieAttributeHandler getAttribHandler(java.lang.String name)
Gets attribute handler CookieAttributeHandler for the given attribute.

Parameters:
name - attribute name. e.g. Domain, Path, etc.
Throws:
java.lang.IllegalStateException - if handler not found for the specified attribute.

getAttribHandlers

protected java.util.Collection<org.apache.http.cookie.CookieAttributeHandler> getAttribHandlers()