Class DefaultCookieManager

  • All Implemented Interfaces:
    CookieManager

    @Scope("session")
    public class DefaultCookieManager
    extends java.lang.Object
    implements CookieManager
    Orbeon specific implementation for CookieManager

    Since the class has session scope, only one instance of this class is attached to a client.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.http.cookie.CookieOrigin getCookieOrigin​(java.lang.String url)  
      void processRequest​(java.net.HttpURLConnection conn, java.lang.String url)
      Copies the stored cookies to the given http connection.
      void processResponse​(java.net.HttpURLConnection conn, java.lang.String url)
      Returning cookies coming from the proxied connection are stored locally, for instance: Set-Cookie.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultCookieManager

        public DefaultCookieManager()
    • Method Detail

      • processRequest

        public void processRequest​(java.net.HttpURLConnection conn,
                                   java.lang.String url)
                            throws java.net.URISyntaxException
        Description copied from interface: CookieManager
        Copies the stored cookies to the given http connection. If no previous manager exists one will be created and stored as part of the current session.
        Specified by:
        processRequest in interface CookieManager
        Parameters:
        conn - Http Connection to copy the cookies to
        url - URL to be accessed.
        Throws:
        java.net.URISyntaxException
      • processResponse

        public void processResponse​(java.net.HttpURLConnection conn,
                                    java.lang.String url)
                             throws java.net.URISyntaxException,
                                    org.apache.http.cookie.MalformedCookieException
        Description copied from interface: CookieManager
        Returning cookies coming from the proxied connection are stored locally, for instance: Set-Cookie.
        Specified by:
        processResponse in interface CookieManager
        Parameters:
        conn - Http Connection to copy the cookies from
        url - URL that has been accessed
        Throws:
        java.net.URISyntaxException
        org.apache.http.cookie.MalformedCookieException
      • getCookieOrigin

        public org.apache.http.cookie.CookieOrigin getCookieOrigin​(java.lang.String url)
                                                            throws java.net.URISyntaxException
        Throws:
        java.net.URISyntaxException