org.apache.james.postage.result
Class PostageRunnerResultImpl

java.lang.Object
  extended by org.apache.james.postage.result.PostageRunnerResultImpl
All Implemented Interfaces:
PostageRunnerResult

public class PostageRunnerResultImpl
extends java.lang.Object
implements PostageRunnerResult


Constructor Summary
PostageRunnerResultImpl()
           
 
Method Summary
 void addError(int errorNumber, java.lang.String errorMessage)
           
 void addJVMResult(JVMResourcesRecord jvmResourcesRecord)
           
 void addNewMailRecord(MailProcessingRecord mailProcessingRecord)
          add a record to be matched later on
 long getErrorCount()
           
 long getMatchedMails()
           
 long getTimestampFirstResult()
           
 long getTimestampLastResult()
           
 long getUnmatchedMails()
           
 long getValidMails()
           
 MailProcessingRecord matchMailRecord(MailProcessingRecord mailProcessingRecord)
          retrieve the matching record, if existing
 void recordValidatedMatch(MailProcessingRecord matchedAndMergedRecord)
          count the valid matches
 void setEnvironmentDescription(java.util.Map descriptionItems)
           
 void writeErrors(java.lang.String filenameErrors)
           
 void writeJVMStatistics(java.lang.String filenameJVMStatistics)
           
 void writeMailResults(java.io.OutputStreamWriter outputStreamWriter, boolean flushOnlyMatched)
           
 void writeMailResults(java.lang.String filenameMailResults, boolean flushMatchedMailOnly)
           
 void writeResults(java.lang.String filenameMailResults, java.lang.String filenameJVMStatistics, java.lang.String filenameErrors, boolean flushMatchedMailOnly)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostageRunnerResultImpl

public PostageRunnerResultImpl()
Method Detail

addNewMailRecord

public void addNewMailRecord(MailProcessingRecord mailProcessingRecord)
Description copied from interface: PostageRunnerResult
add a record to be matched later on

Specified by:
addNewMailRecord in interface PostageRunnerResult

matchMailRecord

public MailProcessingRecord matchMailRecord(MailProcessingRecord mailProcessingRecord)
Description copied from interface: PostageRunnerResult
retrieve the matching record, if existing

Specified by:
matchMailRecord in interface PostageRunnerResult
Parameters:
mailProcessingRecord - record for whom a match is searched
Returns:
null, if no match is found or matching and merged record otherwise

recordValidatedMatch

public void recordValidatedMatch(MailProcessingRecord matchedAndMergedRecord)
Description copied from interface: PostageRunnerResult
count the valid matches

Specified by:
recordValidatedMatch in interface PostageRunnerResult

addJVMResult

public void addJVMResult(JVMResourcesRecord jvmResourcesRecord)
Specified by:
addJVMResult in interface PostageRunnerResult

setEnvironmentDescription

public void setEnvironmentDescription(java.util.Map descriptionItems)
Specified by:
setEnvironmentDescription in interface PostageRunnerResult

getUnmatchedMails

public long getUnmatchedMails()
Specified by:
getUnmatchedMails in interface PostageRunnerResult

getMatchedMails

public long getMatchedMails()
Specified by:
getMatchedMails in interface PostageRunnerResult

getValidMails

public long getValidMails()
Specified by:
getValidMails in interface PostageRunnerResult

writeMailResults

public void writeMailResults(java.io.OutputStreamWriter outputStreamWriter,
                             boolean flushOnlyMatched)
                      throws java.io.IOException
Throws:
java.io.IOException

getTimestampFirstResult

public long getTimestampFirstResult()
Specified by:
getTimestampFirstResult in interface PostageRunnerResult

getTimestampLastResult

public long getTimestampLastResult()
Specified by:
getTimestampLastResult in interface PostageRunnerResult

addError

public void addError(int errorNumber,
                     java.lang.String errorMessage)
Specified by:
addError in interface PostageRunnerResult

getErrorCount

public long getErrorCount()
Specified by:
getErrorCount in interface PostageRunnerResult

writeResults

public void writeResults(java.lang.String filenameMailResults,
                         java.lang.String filenameJVMStatistics,
                         java.lang.String filenameErrors,
                         boolean flushMatchedMailOnly)
Specified by:
writeResults in interface PostageRunnerResult

writeMailResults

public void writeMailResults(java.lang.String filenameMailResults,
                             boolean flushMatchedMailOnly)

writeJVMStatistics

public void writeJVMStatistics(java.lang.String filenameJVMStatistics)

writeErrors

public void writeErrors(java.lang.String filenameErrors)


Copyright © 2006-2007 The Apache Software Foundation. All Rights Reserved.