|
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.ReadStatSession
com.jivesoftware.base.stats.HTTPReadStatSession
public class HTTPReadStatSession
Encapsulates a series of HTTP read stat occurrences. Each session has an ID, the date it was created and extra HTTP info (IP, referrer and user agent).
Note, this class is basically a simple bean and does not handle its own persistence. Other classes should persist it to a db or filesystem.
This class has been marked as serializable since it will likely need to be set in the HttpSession.
Constructor Summary | |
---|---|
HTTPReadStatSession()
|
|
HTTPReadStatSession(java.lang.String visitorID,
java.util.Date creationDate,
java.lang.String referrer,
java.lang.String userAgent,
java.lang.String ip,
java.lang.String country)
Creates an 'unsaved' session given all parameters but the ID. |
|
HTTPReadStatSession(java.lang.String visitorID,
long sessionID,
java.util.Date creationDate,
java.lang.String referrer,
java.lang.String userAgent,
java.lang.String ip,
java.lang.String country)
Creates an HTTP session given all parameters. |
Method Summary | |
---|---|
long |
getBytesSent()
Returns the total number of bytes transferred over the lifetime of this session. |
java.lang.String |
getCountry()
Returns the code for the country this session is created under (ie, US, UK, DE, FR, etc). |
java.lang.String |
getIP()
Returns the IP of the host making the request. |
java.lang.String |
getReferrer()
Returns the http referrer for this session. |
java.lang.String |
getUserAgent()
Returns the user agent for this session or null if one was not found. |
java.lang.String |
toString()
Returns the session in a readable format - good for debugging. |
void |
updateBytesSent(long newBytesSent)
Adds to the total number of bytes sent from the server to the client over the life of this session. |
Methods inherited from class com.jivesoftware.base.stats.ReadStatSession |
---|
getCreationDate, getSessionID, getVisitorID, setSessionID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HTTPReadStatSession()
public HTTPReadStatSession(java.lang.String visitorID, long sessionID, java.util.Date creationDate, java.lang.String referrer, java.lang.String userAgent, java.lang.String ip, java.lang.String country)
visitorID
- the ID of the visitor.sessionID
- a unique session ID.creationDate
- the date the session was created.referrer
- the referrer for the session or null if it is unknown.userAgent
- the user agent of the session (user agents need only be recorded once
per session since they won't change during a session.ip
- the IP address of the requesting host no null if it is unknown.country
- the code of the country this session is created by (ie, US, UK, DE, FR, etc).public HTTPReadStatSession(java.lang.String visitorID, java.util.Date creationDate, java.lang.String referrer, java.lang.String userAgent, java.lang.String ip, java.lang.String country)
visitorID
- the ID of the visitor.creationDate
- the date the session was created.referrer
- the referrer for the session or null if it is unknown.userAgent
- the user agent of the session (user agents need only be recorded once
per session since they won't change during a session.ip
- the IP address of the requesting host no null if it is unknown.country
- the code of the country this session is created by (ie, US, UK, DE, FR, etc).Method Detail |
---|
public java.lang.String getReferrer()
public java.lang.String getUserAgent()
public java.lang.String getIP()
public java.lang.String getCountry()
Locale
class or
http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html.
public long getBytesSent()
public void updateBytesSent(long newBytesSent)
newBytesSent
- the new amount of bytes sent.public java.lang.String toString()
toString
in class ReadStatSession
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |