uPortal 2.4.1
API Documentation

org.jasig.portal.utils
Class CookieCutter

java.lang.Object
  extended byorg.jasig.portal.utils.CookieCutter

public class CookieCutter
extends java.lang.Object

CookieCutter is a utility class which stores, sends and receives cookies for a CWebProxy channel instance. It can be used in other classes where appropriate. All cookies which are sent from the proxied application (and therefore need to be sent back) are kept in a Vector.


Constructor Summary
CookieCutter()
          Instantiates a new CookieCutter object.
 
Method Summary
 boolean cookiesExist()
          Returns true if cookies need to be sent to proxied application.
 void sendCookieHeader(java.net.HttpURLConnection httpUrlConnect, java.lang.String domain, java.lang.String path, java.lang.String port)
          Sends a cookie header to origin server according to the Netscape specification.
 void storeCookieHeader(java.net.HttpURLConnection httpUrlConnect, java.lang.String domain, java.lang.String path, java.lang.String port)
          Parses the cookie headers and stores the cookies in the cookies Vector.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CookieCutter

public CookieCutter()
Instantiates a new CookieCutter object.

Method Detail

cookiesExist

public boolean cookiesExist()
Returns true if cookies need to be sent to proxied application.


sendCookieHeader

public void sendCookieHeader(java.net.HttpURLConnection httpUrlConnect,
                             java.lang.String domain,
                             java.lang.String path,
                             java.lang.String port)
Sends a cookie header to origin server according to the Netscape specification.

Parameters:
httpUrlConnect - The HttpURLConnection handling this URL connection
domain - The domain value of the cookie
path - The path value of the cookie
port - The port value of the cookie

storeCookieHeader

public void storeCookieHeader(java.net.HttpURLConnection httpUrlConnect,
                              java.lang.String domain,
                              java.lang.String path,
                              java.lang.String port)
Parses the cookie headers and stores the cookies in the cookies Vector.


uPortal 2.4.1
API Documentation