|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectservicenow.community.soap.CookieJar
public class CookieJar
The CookieJar class is used to hold HTTP cookies. It knows how to read a cookie from an HttpURLConnection (fetchFromConnection) and how to write cookies from an HttpConnection.
In the context of this application the CookieJar contains only a single cookie: JSESSIONID
Constructor Summary | |
---|---|
CookieJar()
|
Method Summary | |
---|---|
java.lang.String |
getAllCookies()
|
java.lang.String |
getCookie(java.lang.String name)
|
boolean |
isEmpty()
|
void |
load(java.net.HttpURLConnection connection,
boolean clear)
Reads all cookies from an HttpURLConnection and save them in the jar |
void |
postAll(java.net.HttpURLConnection connection)
Write all the cookies in the jar to the HttpURLConnection. |
void |
setCookie(java.lang.String name,
java.lang.String value)
Save a cookie in the cookie jar. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CookieJar()
Method Detail |
---|
public void load(java.net.HttpURLConnection connection, boolean clear)
connection
- HTTP Connection from which the cookie will be retrievedclear
- If true then empty the jar before loadingpublic void setCookie(java.lang.String name, java.lang.String value)
name
- Name of cookievalue
- String value of cookiepublic java.lang.String getCookie(java.lang.String name)
public boolean isEmpty()
public java.lang.String getAllCookies()
public void postAll(java.net.HttpURLConnection connection)
connection
- HTTP Connection to which cookies will be posted using setRequestProperty
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |