alma::acs::jlog::test::EngineFilteringTest Class Reference

Inheritance diagram for alma::acs::jlog::test::EngineFilteringTest:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::jlog::test::EngineFilteringTest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 EngineFilteringTest () throws Exception
void acsLogConnConnecting ()
void acsLogConnDisconnected ()
void acsLogConnEstablished ()
void acsLogConnLost ()
void acsLogConnSuspended ()
void acsLogsDelay ()
void reportStatus (String status)
void logEntryReceived (ILogEntry logEntry)
void xmlEntryReceived (String xmlLogString)
void errorReceived (String xml)
void testAddFilter () throws Exception
void testAddFiltersVector () throws Exception
void testFiltering () throws Exception

Protected Member Functions

void setUp () throws Exception
void tearDown () throws Exception

Private Attributes

LCEngine engine
Vector< ILogEntryreceivedLogs
int xmlLogs = 0
int xmlInfos = 0

Static Private Attributes

static final int TIMEOUT = 120
static final int NUMBER_OF_LOGS = 100

Detailed Description

A class testing the filtering of logs in the engine.

Author:
acaproni

Constructor & Destructor Documentation

alma::acs::jlog::test::EngineFilteringTest::EngineFilteringTest (  )  throws Exception [inline]

Constructor

Exceptions:
Exception 

Member Function Documentation

void alma::acs::jlog::test::EngineFilteringTest::acsLogConnConnecting (  )  [inline]

Notify that an attempt to connect to ACS NC is in progress

Implements com::cosylab::logging::engine::ACS::ACSLogConnectionListener.

void alma::acs::jlog::test::EngineFilteringTest::acsLogConnDisconnected (  )  [inline]
void alma::acs::jlog::test::EngineFilteringTest::acsLogConnEstablished (  )  [inline]
void alma::acs::jlog::test::EngineFilteringTest::acsLogConnLost (  )  [inline]
void alma::acs::jlog::test::EngineFilteringTest::acsLogConnSuspended (  )  [inline]
void alma::acs::jlog::test::EngineFilteringTest::acsLogsDelay (  )  [inline]

Notify that for some internal reason the service is not able to follow the flow of the incoming logs and is queueing the messages to be inserted later, when flow will decrease and enough CPU time is availbale

This method is not executed each time a log is queued but once when the situation begins. When the temporary problem has been fixed, the status will revert to connected

Implements com::cosylab::logging::engine::ACS::ACSLogConnectionListener.

void alma::acs::jlog::test::EngineFilteringTest::errorReceived ( String  xml  )  [inline]

Method executed in case of error: print a message in the stdout, tat will show this error

See also:
com.cosylab.logging.engine.ACS.ACSRemoteErrorListener::errorReceived(java.lang.String)

Implements com::cosylab::logging::engine::ACS::ACSRemoteErrorListener.

void alma::acs::jlog::test::EngineFilteringTest::logEntryReceived ( ILogEntry  logEntry  )  [inline]

Executed whenever a new log is received. Filtering works here.

The received log is added to the vector

See also:
com.cosylab.logging.engine.ACS.ACSRemoteLogListener::logEntryReceived(com.cosylab.logging.engine.log.ILogEntry)

Implements com::cosylab::logging::engine::ACS::ACSRemoteLogListener.

References receivedLogs.

void alma::acs::jlog::test::EngineFilteringTest::reportStatus ( String  status  )  [inline]

Send a report string with the current status of the connection

Parameters:
status The status string

Implements com::cosylab::logging::engine::ACS::ACSLogConnectionListener.

void alma::acs::jlog::test::EngineFilteringTest::setUp (  )  throws Exception [inline, protected]
void alma::acs::jlog::test::EngineFilteringTest::tearDown (  )  throws Exception [inline, protected]
void alma::acs::jlog::test::EngineFilteringTest::testAddFilter (  )  throws Exception [inline]
void alma::acs::jlog::test::EngineFilteringTest::testAddFiltersVector (  )  throws Exception [inline]
void alma::acs::jlog::test::EngineFilteringTest::testFiltering (  )  throws Exception [inline]

Set a filter and checks if the logs received are those passing a filters.

In this case we do not need to check the correctness of the logs received in the listeners but only if they are received or not because it means that the engine is using the filters.

For this example, the test defines 1 filter based on the type of the logs.

The correctness of the filtering is also tested in another test because the engine uses the same filters used by the table.

Exceptions:
Exception 

References com::cosylab::logging::engine::ACS::LCEngine::addFilter(), com::cosylab::logging::engine::ACS::LCEngine::connect(), engine, com::cosylab::logging::engine::ACS::LCEngine::getFilters(), com::cosylab::logging::engine::ACS::LCEngine::isConnected(), alma::acs::logging::AcsLogger::log(), alma::acs::component::client::ComponentClientTestCase::m_logger, NUMBER_OF_LOGS, receivedLogs, TIMEOUT, and xmlLogs.

void alma::acs::jlog::test::EngineFilteringTest::xmlEntryReceived ( String  xmlLogString  )  [inline]

Member Data Documentation

Referenced by testFiltering().

final int alma::acs::jlog::test::EngineFilteringTest::TIMEOUT = 120 [static, private]

Referenced by testFiltering().

Referenced by setUp(), and xmlEntryReceived().


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

Generated by  doxygen 1.6.2