|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.base.stats.WebContext
public class WebContext
Encapsulates the request/response objects as well as logic to get and set anonymous guest IDs and retreving of the read stats session object.
This class assumes HttpServletRequest/Response objects, not ServletRequest/Response because HttpSessions and Cookies are used.
Field Summary | |
---|---|
static java.lang.String |
VISITOR_COOKIE_KEY
Cookie name for anonymous visitor IDs. |
static java.lang.String |
VISITOR_SESSION_KEY
Session attribute name for anonymous visitor IDs. |
Constructor Summary | |
---|---|
WebContext(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Creates a new web context based on values in the request and response. |
Method Summary | |
---|---|
static java.lang.String |
createVisitorID(javax.servlet.http.HttpServletRequest request)
Creates a new visitor ID based on information in the HttpServletRequest. |
ReadStatSession |
getReadStatSession()
Returns the read stat session instance associated with this web context. |
javax.servlet.http.HttpServletRequest |
getRequest()
Returns the web request. |
javax.servlet.http.HttpServletResponse |
getResponse()
Returns the web response. |
java.lang.String |
getVisitorID()
Returns an anonymous visitor ID. |
static boolean |
isValidVisitorID(java.lang.String id)
Verifies the visitor ID is of the form: IP:RAND. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VISITOR_COOKIE_KEY
public static final java.lang.String VISITOR_SESSION_KEY
Constructor Detail |
---|
public WebContext(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
request
- the HttpServletRequest object.response
- the HttpServletResponse objectMethod Detail |
---|
public javax.servlet.http.HttpServletRequest getRequest()
public javax.servlet.http.HttpServletResponse getResponse()
public java.lang.String getVisitorID()
public ReadStatSession getReadStatSession()
public static java.lang.String createVisitorID(javax.servlet.http.HttpServletRequest request)
request
- an HttpServletRequest instance
public static boolean isValidVisitorID(java.lang.String id)
id
- the visitor ID to test.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |