org.polliwog.collectors
Interface Collector

All Known Implementing Classes:
HostnameCollector, PageCollector, StatusCodeCollector

public interface Collector

The interface for "Collectors". Each collector is inited via the init(String) method. Fields are then "collected" via the accept(AbstractField) method. Since this is an interface it is possible to write a single implementation that can handle/manage many types of field.

 Last Modified By: $Author: barrygently $
 Last Modified On: $Date: 2005/07/04 14:00:01 $
 Current Revision: $Revision: 1.3 $
 


Method Summary
 boolean accept(AbstractField af)
          The method called to process a field.
 void init(java.lang.String val)
          The method called to init the collector.
 

Method Detail

init

void init(java.lang.String val)
          throws WeblogException
The method called to init the collector.

Parameters:
val - The string used to init this collector. In general this is just some values to configure the collector and provide optionality in behaviour.
Throws:
WeblogException - Throw if there is an issue with initing the collector.

accept

boolean accept(AbstractField af)
               throws WeblogException
The method called to process a field. Whilst an AbstractField is passed in it will in fact be a solid instance (in general one of the classes from the org.polliwog.fields package).

Parameters:
af - The AbstractField from a log entry.
Returns:
true should be returned if the collector instance allows this field, false otherwise.
Throws:
WeblogException - Should be thrown if there is an issue in processing, such as the field type is not supported or if there is an issue with the value(s) that the field contains.
See Also:
org.polliwog.data.LogEntryFormat#createEntry(String,Map)


  Copyright © 2007 Gary Bentley. All Rights Reserved.