org.novadeck.jxla.config
Class Config

java.lang.Object
  |
  +--org.novadeck.jxla.config.Config

public class Config
extends java.lang.Object

Configure all needed information from the config file


Field Summary
static DNSCache dnsDumpFile
          cache containing all reverse dns done
static boolean dnsEnable
          define if reverse dns is enabled
static java.lang.String indexFileName
          webserver default index page ( usually index.html )
static java.lang.String[] logsFiles
          path list of log files to parse
static int maxAgents
          max User Agent to output in report
static int maxKeywords
          maximum keywords to output in report
static int maxNotFound
          max requests with a 404 response to output in report
static int maxRefers
          maximum referers to output
static int maxRemoteHosts
          maximum remote hosts ( surfer computer name/ip ) to output in report
static int maxUris
          max uris to output in report
static java.lang.String[] pagesEntensions
          list of extension files to consider as 'page'
static AbstractSiteConfig siteConfig
          general configuration class
static java.lang.String summaryPageName
          name of the file of summary report ( index.xml, summary.xml ...)
 
Constructor Summary
Config()
           
 
Method Summary
static void addLogLineFormat(java.lang.String s)
          add a valid line format
static void addPageExtension(java.lang.String s)
          add a extension to the list
static void addSearchEngine(java.lang.String name, java.lang.String domain, java.lang.String param)
          add a new SearchEngine for parsing referers
static void displayConfig()
          display all configuration information and exit
static void dumpDnsCache()
          write dns cache to file
static void setConfigClass(java.lang.String s)
          specify the implementation class config
static void setDnsInfo(boolean enable, java.lang.String filename)
          configure dns
static void setLogFiles(java.lang.String directory, java.lang.String regexp)
          initialize list of log files
static void setMaxAgents(int _max)
          set the maximum of User agents to output
static void setMaxKeywords(int _max)
          set the maximum of keywords to output
static void setMaxNotFound(int _max)
          set the maximum of not found requests to output
static void setMaxRefers(int _max)
          set the maximum of referers to output
static void setMaxRemotehosts(int _max)
          set the maximum of remote hosts to output
static void setMaxUris(int _max)
          set the maximum of uris to output
static void setSummaryPageName(java.lang.String s)
          set the name of the summary report file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

siteConfig

public static AbstractSiteConfig siteConfig
general configuration class

pagesEntensions

public static java.lang.String[] pagesEntensions
list of extension files to consider as 'page'

dnsEnable

public static boolean dnsEnable
define if reverse dns is enabled

dnsDumpFile

public static DNSCache dnsDumpFile
cache containing all reverse dns done

logsFiles

public static java.lang.String[] logsFiles
path list of log files to parse

maxRefers

public static int maxRefers
maximum referers to output

maxKeywords

public static int maxKeywords
maximum keywords to output in report

maxAgents

public static int maxAgents
max User Agent to output in report

maxRemoteHosts

public static int maxRemoteHosts
maximum remote hosts ( surfer computer name/ip ) to output in report

maxUris

public static int maxUris
max uris to output in report

maxNotFound

public static int maxNotFound
max requests with a 404 response to output in report

summaryPageName

public static java.lang.String summaryPageName
name of the file of summary report ( index.xml, summary.xml ...)

indexFileName

public static java.lang.String indexFileName
webserver default index page ( usually index.html )
Constructor Detail

Config

public Config()
Method Detail

setDnsInfo

public static void setDnsInfo(boolean enable,
                              java.lang.String filename)
configure dns
Parameters:
enable - specify if reverse dns is enable
filename - path file where to store reverse dns information

dumpDnsCache

public static void dumpDnsCache()
write dns cache to file

setLogFiles

public static void setLogFiles(java.lang.String directory,
                               java.lang.String regexp)
initialize list of log files
Parameters:
directory - directory path where to locate log files
regexp - regexp that log file names must match to be parsed

addPageExtension

public static void addPageExtension(java.lang.String s)
add a extension to the list
Parameters:
s - file extension of page files

setMaxRefers

public static void setMaxRefers(int _max)
set the maximum of referers to output
Parameters:
_max - maximum value

setMaxKeywords

public static void setMaxKeywords(int _max)
set the maximum of keywords to output
Parameters:
_max - maximum value

setMaxAgents

public static void setMaxAgents(int _max)
set the maximum of User agents to output
Parameters:
_max - maximum value

setMaxRemotehosts

public static void setMaxRemotehosts(int _max)
set the maximum of remote hosts to output
Parameters:
_max - maxmimu value

setMaxUris

public static void setMaxUris(int _max)
set the maximum of uris to output
Parameters:
_max - maxmimum value

setMaxNotFound

public static void setMaxNotFound(int _max)
set the maximum of not found requests to output
Parameters:
_max - maximum value

setConfigClass

public static void setConfigClass(java.lang.String s)
specify the implementation class config
Parameters:
s - full class name

addLogLineFormat

public static void addLogLineFormat(java.lang.String s)
add a valid line format
Parameters:
s - valid expression for parsing log lines
See Also:
RegexpData

setSummaryPageName

public static void setSummaryPageName(java.lang.String s)
set the name of the summary report file
Parameters:
s - file name

addSearchEngine

public static void addSearchEngine(java.lang.String name,
                                   java.lang.String domain,
                                   java.lang.String param)
add a new SearchEngine for parsing referers
Parameters:
name - familiar name for the searchengine ( use for output only )
domain - site of the search engine ( google.com, yahoo.com, voila.fr, ...
param - name of the parameter containing the search keywords

displayConfig

public static void displayConfig()
display all configuration information and exit