alma::acs::logging::TestLogDispatcher Class Reference

Inheritance diagram for alma::acs::logging::TestLogDispatcher:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::logging::TestLogDispatcher:
Collaboration graph
[legend]

List of all members.

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())

Constructor & Destructor Documentation

alma::acs::logging::TestLogDispatcher::TestLogDispatcher ( ORB  orb,
AcsLogFormatter  xmlLogFormatter 
) [inline, package]

Member Function Documentation

void alma::acs::logging::TestLogDispatcher::clearCollectedXmlLogRecords (  )  [inline, package]
String [] alma::acs::logging::TestLogDispatcher::getCollectedXmlLogRecords (  )  [inline, package]
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.

Parameters:
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]
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.

Parameters:
anyLogRecordsArray 
Exceptions:
UserException 

Reimplemented from alma::acs::logging::RemoteLogDispatcher.

References random, verbose, writeFailureChance, and xmlLogRecordList.


Member Data Documentation

final Random alma::acs::logging::TestLogDispatcher::random = new Random(System.currentTimeMillis()) [private]

Referenced by writeRecords().

Referenced by writeRecords().

Referenced by writeRecords().

final List<String> alma::acs::logging::TestLogDispatcher::xmlLogRecordList = new ArrayList<String>() [private]

The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2