|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Standard interface for all proxied sessions. Handles the communication and session state between the webpage service and a single site
| Method Summary | |
boolean |
addCookieToSession(javax.servlet.http.Cookie cookie)
Given a cookie, it first checks to see if that cookie is already managed in this session. |
void |
drainContent(java.net.URLConnection con,
javax.servlet.http.HttpServletResponse response)
Retrieves the content from the URL Connection stream and writes it to servlet response |
int |
getCacheCount()
Gets the cache count for this session. |
java.lang.String |
getContentAsString(java.net.URLConnection con,
ProxyRunData data,
java.lang.String url)
Gets the HTML content from the URL Connection stream and returns it as a Stream |
int |
getHitCount()
Gets the hitcount for this session. |
void |
incCacheCount()
Increments the hitcount for this session. |
void |
incHitCount()
Increments the hitcount for this session. |
boolean |
logon(ProxyRunData data)
Logs on to the target host |
boolean |
logout(ProxyRunData data)
Logs out of the target host |
void |
proxy(java.lang.String site,
ProxyRunData data)
Given a site URL, proxies the content of that site. |
void |
rewriteContent(ProxyRunData data,
java.net.URLConnection con,
int contentType,
java.lang.String url)
Reads stream for proxied host, runs a rewriter against that stream, rewriting relevant links, and writes the parsed stream back to the client. |
| Method Detail |
public void proxy(java.lang.String site,
ProxyRunData data)
throws java.io.IOException
site - the proxied resource address.data - the request specific rundata.
java.io.IOException - a servlet exception.
public java.lang.String getContentAsString(java.net.URLConnection con,
ProxyRunData data,
java.lang.String url)
throws java.io.IOException
con - The URLConnection to read from.data - the request specific rundata.
java.io.IOException - a servlet exception.
public void drainContent(java.net.URLConnection con,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
con - The URLConnection to read from.
java.io.IOException - a servlet exception.public boolean addCookieToSession(javax.servlet.http.Cookie cookie)
cookie - new cookie returned from target server.
public boolean logon(ProxyRunData data)
throws java.io.IOException
data - the request specific rundata.
java.io.IOException - a servlet exception.
public boolean logout(ProxyRunData data)
throws java.io.IOException
data - the request specific rundata.
java.io.IOException - a servlet exception.
public void rewriteContent(ProxyRunData data,
java.net.URLConnection con,
int contentType,
java.lang.String url)
throws java.io.IOException
con - the URLConnection with proxied host.contentType - the contentType of the request.
java.io.IOException - a servlet exception.public int getHitCount()
public void incHitCount()
public int getCacheCount()
public void incCacheCount()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||