Open SiteSearch 4.1.1
Final

ORG.oclc.stats
Class Stats

java.lang.Object
  |
  +--ORG.oclc.stats.Stats
Direct Known Subclasses:
JaSSIUserStats

public abstract class Stats
extends Object

The Stats class is an abstract class defining methods must be implemented to create a new statistics class for writing JaSSI User Statistics.

The JaSSIUserStats class implements Stats as the baseline example of a statistics class in the SiteSearch product to write comma delimited statistics records.

See Also:
UserHistory

Field Summary
static Stats statsOut
          static Stats object that is used by all classes implementing Stats.
 
Constructor Summary
Stats()
           
 
Method Summary
abstract  void close()
          Closes the stats file descriptor or socket depending on the implementation.
 void open()
          Opens a stats log file using the filename information stored in the Stats object - used to "roll" stats logs.
abstract  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.
abstract  void rollOver(long currentTime)
          Checks the timer for stats log rollover with the input current time.
abstract  void setRollOverTime(int time)
          Sets a timer for rolling over (close/open new) the stats log using the input time parameter in seconds.
abstract  void write(Object user, Vector userHistory)
          Writes statistics to the stats log for a user object and the input Vector UserHistory objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

statsOut

public static Stats statsOut
static Stats object that is used by all classes implementing Stats.
Constructor Detail

Stats

public Stats()
Method Detail

open

public abstract 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 object from the server configuration.
serverHost - the host id for the current JaSSI Server.
serverPort - the port for the JaSSI server.

open

public void open()
Opens a stats log file using the filename information stored in the Stats object - used to "roll" stats logs.

close

public abstract void close()
Closes the stats file descriptor or socket depending on the implementation.

write

public abstract void write(Object user,
                           Vector userHistory)
Writes statistics to the stats log for a user object and the input Vector UserHistory objects.
Parameters:
user - the user object to write stats for.
userHistory - the saved history for the user with statistical information.

setRollOverTime

public abstract void setRollOverTime(int time)
Sets a timer for rolling over (close/open new) the stats log using the input time parameter in seconds.
Parameters:
time - the number of seconds. 0 indicates the file will remain open for the life of the server and no rollover will take place.

rollOver

public abstract void rollOver(long currentTime)
Checks the timer for stats log rollover with the input current time.
Parameters:
currentTime - the current millisecond time to compare to the open time of the stats file.

Open SiteSearch 4.1.1
Final