|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface LogAnalyzer
An interface for a web server log analyzer that processes web log data analyses hourly and weekly access patterns. This interface is based on the web log analyzer from Chapter 4 of Objects First with Java, by David J. Barnes and Michael Kolling.
| Method Summary | |
|---|---|
int |
accessCountsForDay(int day)
Retrieve a count of web accesses for the specified day of the week. |
int |
accessCountsForDayHour(int day,
int hour)
Retrieve a count of web accesses for the specified time period. |
int |
accessCountsForHour(int hour)
Retrieve a count of web accesses during the specified hour of the day. |
void |
accumulateLogData(BufferedReader inStream)
Add all log entries from a given stream to the current access pattern data. |
void |
accumulateLogDataFromFile(String file)
Add all log entries from a given file to the current access pattern data. |
void |
accumulateLogDataFromURL(String url)
Add all log entries from a given URL to the current access pattern data. |
| Method Detail |
|---|
int accessCountsForDay(int day)
Calendar day constant (e.g.,
Calendar.SUNDAY ...
Calendar.SATURDAY).
day - the weekday for which accesses are reported
int accessCountsForDayHour(int day,
int hour)
Calendar day constant (e.g.,
Calendar.SUNDAY ...
Calendar.SATURDAY), and an hour of the
day (0-23).
day - the weekday for which accesses are reportedhour - the hour of the given day
int accessCountsForHour(int hour)
hour - the hour to report on (0-23)
void accumulateLogData(BufferedReader inStream)
inStream - the stream to read log entries fromvoid accumulateLogDataFromFile(String file)
accumulateLogData(BufferedReader), but by taking a file
name instead.
file - the file to read log entries fromvoid accumulateLogDataFromURL(String url)
accumulateLogData(BufferedReader), but by taking a URL
instead.
url - the URL to read log entries from
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||