public class ListRecorder extends AbstractRecorder
MessageRecorder
that records each message
in a List
. The calling code can then access the list and take
actions as needed.Modifier and Type | Class and Description |
---|---|
static class |
ListRecorder.Entry
Entry is a Info, Warning or Error message.
|
DEFAULT_MSG_LIMIT
Constructor and Description |
---|
ListRecorder() |
Modifier and Type | Method and Description |
---|---|
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) |
void |
logWarningMessage(org.apache.log4j.Logger logger) |
protected void |
recordMessage(String msg,
Object info,
mondrian.recorder.AbstractRecorder.MsgType msgType)
Handles a message.
|
getContext, getErrorCount, getInfoCount, getRunTimeMillis, getStartTimeMillis, getWarningCount, hasErrors, hasInformation, hasWarnings, logMessage, popContextName, pushContextName, reportError, reportError, reportError, reportError, reportInfo, reportInfo, reportWarning, reportWarning, throwRTException
public void clear()
AbstractRecorder
clear
in interface MessageRecorder
clear
in class AbstractRecorder
public Iterator<ListRecorder.Entry> getErrorEntries()
public Iterator<ListRecorder.Entry> getWarnEntries()
public Iterator<ListRecorder.Entry> getInfoEntries()
protected void recordMessage(String msg, Object info, mondrian.recorder.AbstractRecorder.MsgType msgType)
AbstractRecorder
recordMessage
in class AbstractRecorder
msg
- the error or warning message.info
- the information Object which might be null.msgType
- one of the message type enum valuespublic void logInfoMessage(org.apache.log4j.Logger logger)
public void logWarningMessage(org.apache.log4j.Logger logger)
public void logErrorMessage(org.apache.log4j.Logger logger)
Copyright © 2020 Hitachi Vantara. All rights reserved.