public interface LogAnalyzer
Modifier and Type | Method and Description |
---|---|
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(Scanner 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.
|
void accumulateLogData(Scanner inStream)
inStream
- the stream to read log entries fromvoid accumulateLogDataFromFile(String file)
accumulateLogData(Scanner)
, but by taking a file
name instead.file
- the file to read log entries fromvoid accumulateLogDataFromURL(String url)
accumulateLogData(Scanner)
, but by taking a URL
instead.url
- the URL to read log entries fromint 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 dayint accessCountsForDay(int day)
Calendar
day constant (e.g.,
Calendar.SUNDAY
...
Calendar.SATURDAY
).day
- the weekday for which accesses are reportedint accessCountsForHour(int hour)
hour
- the hour to report on (0-23)