

Protected Member Functions | |
| void | writeRecords (Any[] anyLogRecordsArray) throws UserException |
| void | writeRecords (XmlLogRecord[] remoteLogRecords) |
Package Functions | |
| TestLogDispatcher (ORB orb, AcsLogFormatter xmlLogFormatter) | |
| String[] | getCollectedXmlLogRecords () |
| void | clearCollectedXmlLogRecords () |
| void | setVerbose (boolean verbose) |
| void | setWriteFailureChance (double writeFailureChance) |
Private Attributes | |
| final List< String > | xmlLogRecordList = new ArrayList<String>() |
| boolean | verbose = true |
| double | writeFailureChance = 0.0 |
| final Random | random = new Random(System.currentTimeMillis()) |
| alma::acs::logging::TestLogDispatcher::TestLogDispatcher | ( | ORB | orb, | |
| AcsLogFormatter | xmlLogFormatter | |||
| ) | [inline, package] |
| void alma::acs::logging::TestLogDispatcher::clearCollectedXmlLogRecords | ( | ) | [inline, package] |
| String [] alma::acs::logging::TestLogDispatcher::getCollectedXmlLogRecords | ( | ) | [inline, package] |
References xmlLogRecordList.
Referenced by alma::acs::logging::RemoteLogDispatcherTest::testFailingRecords(), alma::acs::logging::RemoteLogDispatcherTest::testFlushByRecordNumber(), alma::acs::logging::RemoteLogDispatcherTest::testPeriodicFlush(), alma::acs::logging::RemoteLogDispatcherTest::testSendLogRecords(), and alma::acs::logging::RemoteLogDispatcherTest::testUnavailableRemoteLogService().
| void alma::acs::logging::TestLogDispatcher::setVerbose | ( | boolean | verbose | ) | [inline, package] |
| void alma::acs::logging::TestLogDispatcher::setWriteFailureChance | ( | double | writeFailureChance | ) | [inline, package] |
Sets the chance that a call to writeRecords will fail with an exception.
| writeFailureChance | probability between 0.0 and 1.0 inclusive |
Referenced by alma::acs::logging::RemoteLogDispatcherTest::testFailingRecords(), and alma::acs::logging::RemoteLogDispatcherTest::testQueueOverflow().
| void alma::acs::logging::TestLogDispatcher::writeRecords | ( | XmlLogRecord[] | remoteLogRecords | ) | [inline, protected] |
Alternative to used when property alma.acs.logging.useAcsLogServiceExtensions is set. remoteLogRecords
Reimplemented from alma::acs::logging::RemoteLogDispatcher.
References verbose, and xmlLogRecordList.
| void alma::acs::logging::TestLogDispatcher::writeRecords | ( | Any[] | anyLogRecordsArray | ) | throws UserException [inline, protected] |
The CORBA call to Log#write_records(Any[]). May be faked by test subclasses.
| anyLogRecordsArray |
| UserException |
Reimplemented from alma::acs::logging::RemoteLogDispatcher.
References random, verbose, writeFailureChance, and xmlLogRecordList.
final Random alma::acs::logging::TestLogDispatcher::random = new Random(System.currentTimeMillis()) [private] |
Referenced by writeRecords().
boolean alma::acs::logging::TestLogDispatcher::verbose = true [private] |
Referenced by writeRecords().
double alma::acs::logging::TestLogDispatcher::writeFailureChance = 0.0 [private] |
Referenced by writeRecords().
final List<String> alma::acs::logging::TestLogDispatcher::xmlLogRecordList = new ArrayList<String>() [private] |
Referenced by clearCollectedXmlLogRecords(), getCollectedXmlLogRecords(), and writeRecords().
1.6.2