mondrian.recorder
Class ListRecorder

java.lang.Object
  extended by mondrian.recorder.AbstractRecorder
      extended by mondrian.recorder.ListRecorder
All Implemented Interfaces:
MessageRecorder

public class ListRecorder
extends AbstractRecorder

Implementation of MessageRecorder that records each message in a List. The calling code can then access the list and take actions as needed.

 

Nested Class Summary
static class ListRecorder.Entry
          Entry is a Info, Warning or Error message.
 
Nested classes/interfaces inherited from class mondrian.recorder.AbstractRecorder
AbstractRecorder.MsgType
 
Field Summary
 
Fields inherited from class mondrian.recorder.AbstractRecorder
DEFAULT_MSG_LIMIT
 
Constructor Summary
ListRecorder()
           
 
Method Summary
 void clear()
          Resets this MessageRecorder.
 Iterator<ListRecorder.Entry> getErrorEntries()
           
 Iterator<ListRecorder.Entry> getInfoEntries()
           
 Iterator<ListRecorder.Entry> getWarnEntries()
           
 void logErrorMessage(org.apache.log4j.Logger logger)
           
 void logInfoMessage(org.apache.log4j.Logger logger)
           
(package private) static void logMessage(Iterator<ListRecorder.Entry> it, org.apache.log4j.Logger logger)
           
(package private) static void logMessage(ListRecorder.Entry e, org.apache.log4j.Logger logger)
           
 void logWarningMessage(org.apache.log4j.Logger logger)
           
protected  void recordMessage(String msg, Object info, AbstractRecorder.MsgType msgType)
          Handles a message.
 
Methods inherited from class mondrian.recorder.AbstractRecorder
getContext, getErrorCount, getInfoCount, getRunTimeMillis, getStartTimeMillis, getWarningCount, hasErrors, hasInformation, hasWarnings, logMessage, popContextName, pushContextName, reportError, reportError, reportError, reportError, reportInfo, reportInfo, reportWarning, reportWarning, throwRTException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListRecorder

public ListRecorder()
Method Detail

clear

public void clear()
Description copied from class: AbstractRecorder
Resets this MessageRecorder.

Specified by:
clear in interface MessageRecorder
Overrides:
clear in class AbstractRecorder

getErrorEntries

public Iterator<ListRecorder.Entry> getErrorEntries()

getWarnEntries

public Iterator<ListRecorder.Entry> getWarnEntries()

getInfoEntries

public Iterator<ListRecorder.Entry> getInfoEntries()

recordMessage

protected void recordMessage(String msg,
                             Object info,
                             AbstractRecorder.MsgType msgType)
Description copied from class: AbstractRecorder
Handles a message. Classes implementing this abstract class must provide an implemention of this method; it receives all warning/error messages.

Specified by:
recordMessage in class AbstractRecorder
Parameters:
msg - the error or warning message.
info - the information Object which might be null.
msgType - one of the message type enum values

logInfoMessage

public void logInfoMessage(org.apache.log4j.Logger logger)

logWarningMessage

public void logWarningMessage(org.apache.log4j.Logger logger)

logErrorMessage

public void logErrorMessage(org.apache.log4j.Logger logger)

logMessage

static void logMessage(Iterator<ListRecorder.Entry> it,
                       org.apache.log4j.Logger logger)

logMessage

static void logMessage(ListRecorder.Entry e,
                       org.apache.log4j.Logger logger)

SourceForge.net_Logo