org.erowid.sperowider.modelreporting
Class LoggingSperowiderModelReporter

java.lang.Object
  extended byorg.erowid.sperowider.modelreporting.LoggingSperowiderModelReporter
All Implemented Interfaces:
IInitializableObject, ISperowiderModelReporter

public class LoggingSperowiderModelReporter
extends Object
implements ISperowiderModelReporter, IInitializableObject

Logs to a set of summary files.

Version:
: $Header: /cvsroot/sperowider/SPEROWIDER_MODULE/javasource/org/erowid/sperowider/modelreporting/LoggingSperowiderModelReporter.java,v 1.3 2005/01/15 23:26:04 gurustu Exp $
Author:
: $Author: gurustu $

Constructor Summary
LoggingSperowiderModelReporter()
           
 
Method Summary
 void init(Element configNode)
          Initializes the location of the files.
 void reportInvalidUrlFound(String url, int httpCode, String httpMessage)
          Logs to SperoLog.DOWNLOAD_INVALIDURL in the format <invalid-url url="" code="" message="" />.
 void reportMapUrlToFilename(String url, String fileName)
          Logs to SperoLog.DOWNLOAD_URLMAP in the format <url-map real-url="" file-name="" />.
 void reportMapUrlToRealUrl(String url, String realUrl)
          Logs to SperoLog.DOWNLOAD_URLMAP in the format <url-map found-url="" real-url="" />.
 void reportUrlFound(String sourceUrl, String foundUrl, String queueMessage)
          Logs to SperoLog.DOWNLOAD_URLFOUND in the format <url-found source-url="" found-url="" queued="" />
 void reportUrlPoppedFromQueue(String url)
          Logs to SperoLog.DOWNLOAD_URLPOPFROMQUEUE in the format <url-queue-pop url="" />.
 void start()
          Does nothing.
 void stop()
          Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingSperowiderModelReporter

public LoggingSperowiderModelReporter()
Method Detail

reportInvalidUrlFound

public void reportInvalidUrlFound(String url,
                                  int httpCode,
                                  String httpMessage)
Logs to SperoLog.DOWNLOAD_INVALIDURL in the format <invalid-url url="" code="" message="" />.

Specified by:
reportInvalidUrlFound in interface ISperowiderModelReporter

reportMapUrlToFilename

public void reportMapUrlToFilename(String url,
                                   String fileName)
Logs to SperoLog.DOWNLOAD_URLMAP in the format <url-map real-url="" file-name="" />.

Specified by:
reportMapUrlToFilename in interface ISperowiderModelReporter

reportMapUrlToRealUrl

public void reportMapUrlToRealUrl(String url,
                                  String realUrl)
Logs to SperoLog.DOWNLOAD_URLMAP in the format <url-map found-url="" real-url="" />.

Specified by:
reportMapUrlToRealUrl in interface ISperowiderModelReporter

reportUrlFound

public void reportUrlFound(String sourceUrl,
                           String foundUrl,
                           String queueMessage)
Logs to SperoLog.DOWNLOAD_URLFOUND in the format <url-found source-url="" found-url="" queued="" />

Specified by:
reportUrlFound in interface ISperowiderModelReporter

reportUrlPoppedFromQueue

public void reportUrlPoppedFromQueue(String url)
Logs to SperoLog.DOWNLOAD_URLPOPFROMQUEUE in the format <url-queue-pop url="" />.

Specified by:
reportUrlPoppedFromQueue in interface ISperowiderModelReporter

start

public void start()
Does nothing.

Specified by:
start in interface ISperowiderModelReporter

stop

public void stop()
Does nothing.

Specified by:
stop in interface ISperowiderModelReporter

init

public void init(Element configNode)
          throws SperowiderInstantiationException
Initializes the location of the files.

Specified by:
init in interface IInitializableObject
Throws:
SperowiderInstantiationException

spero logo small Sperowider is
© 2005 Erowid.org