public interface CookieHandler
Note: The defined cookie policies apply. The default is CookiePolicy.ACCEPT_ORIGINAL_SERVER, so cookies will only be handled for fully qualified host names in the URI (not local host names like "myhost" or "localhost").
| Modifier and Type | Method and Description |
|---|---|
CookieStore |
getCookieStore(org.apache.camel.Exchange exchange)
Get the CookieStore.
|
Map<String,List<String>> |
loadCookies(org.apache.camel.Exchange exchange,
URI uri)
Create cookie headers from the stored cookies appropriate for a given
URI.
|
void |
setCookiePolicy(CookiePolicy cookiePolicy)
Define a CookiePolicy for cookies stored by this CookieHandler
|
void |
storeCookies(org.apache.camel.Exchange exchange,
URI uri,
Map<String,List<String>> headerMap)
Store cookies for a HTTP response in the cookie handler
|
void storeCookies(org.apache.camel.Exchange exchange,
URI uri,
Map<String,List<String>> headerMap)
throws IOException
exchange - the exchangeuri - the URI of the called HTTP serviceheaderMap - a map containing the HTTP headers returned by the serverIOException - if the cookies cannot be storedMap<String,List<String>> loadCookies(org.apache.camel.Exchange exchange, URI uri) throws IOException
exchange - the exchangeuri - the URI of the called HTTP serviceIOException - if the cookies cannot be loadedCookieStore getCookieStore(org.apache.camel.Exchange exchange)
exchange - the exchangevoid setCookiePolicy(CookiePolicy cookiePolicy)
cookiePolicy - the CookiePolicyApache Camel