Open SiteSearch 4.1.1
Final

ORG.oclc.stats
Class JaSSIUserStats

java.lang.Object
  |
  +--ORG.oclc.stats.Stats
        |
        +--ORG.oclc.stats.JaSSIUserStats

public class JaSSIUserStats
extends Stats

The JaSSIUserStats class writes comma delimited user statistics to an output file using the statistics saved in a Vector of UserHistory objects during a user session. It also provides methods to open, close, re-open statistics log files.

The output can contain the following fields:
User's session Id
Begin time of the transaction
The type of action
Elapsed time of the transacation in milliseconds
Database name
ResultSetName
Number of records read
Query term
Total Postings for the search
The Z39.50 hostname on init
The Z39.50 port on init
The Peer-host
The user's autho entity value
The status of the transaction (WebZErrors code)

If the field is not applicable to the activity, it is blank

See Also:
UserStateObject, UserHistory, WebZUserHistory, JaSSIUserHistory, WebZErrors, ZUserData

Fields inherited from class ORG.oclc.stats.Stats
statsOut
 
Constructor Summary
JaSSIUserStats()
          Constructs a JaSSIUserStats object.
 
Method Summary
 void close()
          Closes the stats log.
 BufferedWriter getLogfile()
          Returns a BufferedWriter object containing the current logfile.
 void open()
          Opens the log file with the current filename settings.
 void open(IniFile ini, String serverHost, int serverPort)
          Opens and initializes a stats log file for the output stats using the configuration information containined in the IniFile object for the input server hostname and server port.
 void rollOver(long currentTime)
          Checks the rollOver time period against the current time to see if it is time to close/re-open the stats log.
 void setRollOverTime(int seconds)
          Sets the log RollOver time for the stats log.
 void write(Object user, Vector userHistory)
          Writes the user statistics to the Statistics file using the inforamtion contained in the Vector of UserHistory objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaSSIUserStats

public JaSSIUserStats()
Constructs a JaSSIUserStats object.
Method Detail

open

public void open(IniFile ini,
                 String serverHost,
                 int serverPort)
Opens and initializes a stats log file for the output stats using the configuration information containined in the IniFile object for the input server hostname and server port.
Parameters:
ini - the inifile from the server
serverHost - the hostId for the server
serverPort - the port the server is running on
Overrides:
open in class Stats

open

public void open()
Opens the log file with the current filename settings.
Overrides:
open in class Stats

write

public void write(Object user,
                  Vector userHistory)
Writes the user statistics to the Statistics file using the inforamtion contained in the Vector of UserHistory objects. This is done during user cleanup before the user is removed from the system.
Parameters:
user - the UserStateObject containing the user state
userHistory - the Vector of UserHistory objects
Overrides:
write in class Stats

rollOver

public void rollOver(long currentTime)
Checks the rollOver time period against the current time to see if it is time to close/re-open the stats log.
Parameters:
currentTime - the current millisecond time to compare with the log open time.
Overrides:
rollOver in class Stats

close

public void close()
Closes the stats log.
Overrides:
close in class Stats

getLogfile

public BufferedWriter getLogfile()
Returns a BufferedWriter object containing the current logfile.

setRollOverTime

public void setRollOverTime(int seconds)
Sets the log RollOver time for the stats log.
Parameters:
seconds - the number of seconds for the rollover timer.
Overrides:
setRollOverTime in class Stats

Open SiteSearch 4.1.1
Final