|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jetspeed.services.webpage.AbstractSiteSession org.apache.jetspeed.services.webpage.JetspeedSiteSession
Represents a session with a site
This class extends AbstractSiteSession, implementing the specific code login and logout to a site. The content rewriter is also specialized here to handle the specific needs
Sessions are stored in the SessionMap per Jetspeed Session. (The SessionMap is stored in the Servlet Session)
Field Summary |
Fields inherited from class org.apache.jetspeed.services.webpage.AbstractSiteSession |
cacheCount, cookies, hitCount, proxyBase, targetBase |
Constructor Summary | |
JetspeedSiteSession(Site site,
java.lang.String proxyBase,
java.lang.String userName)
Create a session, which maintains sessions with one website. |
Method Summary | |
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 |
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 |
Site |
getSite()
Gets the network element object associated with this session. |
java.lang.String |
getUserName()
Gets the user name who owns this session. |
boolean |
logon(ProxyRunData data)
Logs on to the Secured site 'automatically', using a predefined exchange based on a logon-screen POST to the site, sending the logon credentials and security permissions. |
boolean |
logout(ProxyRunData data)
Logs out to the Network Element by sending the session id cookie to a pre-defined logout-URL in the Network Element. |
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 from proxied host, runs HTML parser against that stream, rewriting relevant links, and writes the parsed stream back to the client. |
Methods inherited from class org.apache.jetspeed.services.webpage.AbstractSiteSession |
addCookieToSession, dispatch, getBinaryContent, getCacheCount, getHitCount, getHTMLContent, incCacheCount, incHitCount |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JetspeedSiteSession(Site site, java.lang.String proxyBase, java.lang.String userName)
site
- the site to manage.proxyBase
- the proxy server host URL base address.Method Detail |
public boolean logon(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 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 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 Site getSite()
public java.lang.String getUserName()
public boolean logout(ProxyRunData data) throws java.io.IOException
data
- the request specific rundata.
java.io.IOException
- a servlet exception.public void proxy(java.lang.String site, ProxyRunData data) throws java.io.IOException
SiteSession
site
- the proxied resource address.data
- the request specific rundata.
java.io.IOException
- a servlet exception.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |