|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.utils.CookieCutter
public class CookieCutter
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.
Nested Class Summary | |
---|---|
private class |
CookieCutter.ChannelCookie
This class is used by any channel receiving cookies from a backend application to store cookie information. |
Field Summary | |
---|---|
private java.util.Vector |
cookies
|
private static org.apache.commons.logging.Log |
log
|
private boolean |
supportSetCookie2
|
Constructor Summary | |
---|---|
CookieCutter()
Instantiates a new CookieCutter object. |
Method Summary | |
---|---|
boolean |
cookiesExist()
Returns true if cookies need to be sent to proxied application. |
private void |
processSetCookie2Header(java.lang.String headerVal,
java.lang.String domain,
java.lang.String path,
java.lang.String port)
Processes the Cookie2 header. |
private void |
processSetCookieHeader(java.lang.String headerVal,
java.lang.String domain,
java.lang.String path,
java.lang.String port)
Processes the Cookie header. |
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
private java.util.Vector cookies
private boolean supportSetCookie2
Constructor Detail |
---|
public CookieCutter()
Method Detail |
---|
public boolean cookiesExist()
public void sendCookieHeader(java.net.HttpURLConnection httpUrlConnect, java.lang.String domain, java.lang.String path, java.lang.String port)
httpUrlConnect
- The HttpURLConnection handling this URL connectiondomain
- The domain value of the cookiepath
- The path value of the cookieport
- The port value of the cookiepublic void storeCookieHeader(java.net.HttpURLConnection httpUrlConnect, java.lang.String domain, java.lang.String path, java.lang.String port)
private void processSetCookie2Header(java.lang.String headerVal, java.lang.String domain, java.lang.String path, java.lang.String port)
headerVal
- The value of the headerdomain
- The domain value of the cookiepath
- The path value of the cookieport
- The port value of the cookieprivate void processSetCookieHeader(java.lang.String headerVal, java.lang.String domain, java.lang.String path, java.lang.String port) throws java.text.ParseException
headerVal
- The value of the headerdomain
- The domain value of the cookiepath
- The path value of the cookieport
- The port value of the cookie
java.text.ParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |