Class BaseCookieHandler

    • Constructor Detail

      • BaseCookieHandler

        public BaseCookieHandler()
    • Method Detail

      • storeCookies

        public void storeCookies​(org.apache.camel.Exchange exchange,
                                 URI uri,
                                 Map<String,​List<String>> headerMap)
                          throws IOException
        Description copied from interface: CookieHandler
        Store cookies for a HTTP response in the cookie handler
        Specified by:
        storeCookies in interface CookieHandler
        Parameters:
        exchange - the exchange
        uri - the URI of the called HTTP service
        headerMap - a map containing the HTTP headers returned by the server
        Throws:
        IOException - if the cookies cannot be stored
      • loadCookies

        public Map<String,​List<String>> loadCookies​(org.apache.camel.Exchange exchange,
                                                          URI uri)
                                                   throws IOException
        Description copied from interface: CookieHandler
        Create cookie headers from the stored cookies appropriate for a given URI.
        Specified by:
        loadCookies in interface CookieHandler
        Parameters:
        exchange - the exchange
        uri - the URI of the called HTTP service
        Returns:
        a map containing the cookie headers that can be set to the HTTP request. Only cookies that are supposed to be sent to the URI in question are considered.
        Throws:
        IOException - if the cookies cannot be loaded
      • getCookieStore

        public CookieStore getCookieStore​(org.apache.camel.Exchange exchange)
        Description copied from interface: CookieHandler
        Get the CookieStore. This method can be used if the is using a CookieHandler by itself.
        Specified by:
        getCookieStore in interface CookieHandler
        Parameters:
        exchange - the exchange
        Returns:
        the CookieStore
      • getCookieManager

        protected abstract CookieManager getCookieManager​(org.apache.camel.Exchange exchange)