cdx.scorebot.scoring
Class ScoringCompiler

java.lang.Object
  extended by cdx.scorebot.scoring.ScoringCompiler

public class ScoringCompiler
extends java.lang.Object

compiles ScoreEvents into results information and also applies thresholding information

Author:
David Underhill

Constructor Summary
ScoringCompiler(NetworkTestPackage config)
          instantiates a scoring compiler
ScoringCompiler(NetworkTestPackage config, FlexLogger logger)
          instantiates a scoring compiler
 
Method Summary
 java.lang.String getThresholdMsg()
          gets the message regarding thresholding
 boolean lastEventWasThresholded()
          whether or not the last event processed triggered any thresholding
 int processNextTestEvent(TestEvent evt)
          Process the next TestEvent (chronological order)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScoringCompiler

public ScoringCompiler(NetworkTestPackage config)
                throws LogicException,
                       ParseException
instantiates a scoring compiler

Parameters:
config - the configuration to score with
Throws:
ParseException - occurs if a rule cannot be prepared
LogicException

ScoringCompiler

public ScoringCompiler(NetworkTestPackage config,
                       FlexLogger logger)
                throws LogicException,
                       ParseException
instantiates a scoring compiler

Parameters:
config - the configuration to score with
logger - stream to log to
Throws:
ParseException - occurs if a rule cannot be prepared
LogicException
Method Detail

processNextTestEvent

public int processNextTestEvent(TestEvent evt)
                         throws com.thoughtworks.xstream.core.BaseException,
                                java.io.FileNotFoundException,
                                LogicException
Process the next TestEvent (chronological order)

Parameters:
evt - the TestEvent to process
Returns:
the total score change as a result of this event
Throws:
BaseException - if any ScoreEvent cannot be serialized
FileNotFoundException - if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be saved for any other reason
LogicException - occurs if a runtime error occurs in the scoring language

lastEventWasThresholded

public boolean lastEventWasThresholded()
whether or not the last event processed triggered any thresholding


getThresholdMsg

public java.lang.String getThresholdMsg()
gets the message regarding thresholding