

LCEngine connects to the logging NC and sends messages to the listeners.
A LCEngine object can have an audience (as defined in the log_audience IDL module). If an audience is in use, a special set of filters will be applied.
It is possible to define custom filters to apply to the incoming logs. In this case, only the logs that pass all the filters are sent to the listeners. The filters do not apply to RAW (i.e. XML) log listeners. The custom filters are applied after the audience filtering.
There are three type of listeners supported: - ACSLogConnectionListener: listens events related to the connection with the logging NC and reportMessages - ACSRemoteLogListener: listens for LogEntries - ACSRemoteRawLogListener: listens for XML strings representing logs
It there are no ACSRemoteLogLiestenersRegistered then the string received from the NC is not parsed
The logs read from the NC are sent to the logRetrieval that, in turn, send them to the registered listeners. Audience and filtering are implemented by ACSLogRetrieval.
| com::cosylab::logging::engine::ACS::LCEngine::LCEngine | ( | ) | [inline] |
LCEngine constructor
References listenersDispatcher, and logRetrieval.
| com::cosylab::logging::engine::ACS::LCEngine::LCEngine | ( | boolean | autoReconn | ) | [inline] |
LCEngine constructor.
| autoReconn | If true the engine automatically reconnects |
References autoReconnect.
| com::cosylab::logging::engine::ACS::LCEngine::LCEngine | ( | boolean | autoReconn, | |
| FiltersVector | filters | |||
| ) | [inline] |
LCEngine constructor.
This constructor allows to define a set of filters to apply to incoming logs: only the logs passing the filters are sent to the listeners.
| autoReconn | If true the engine automatically reconnects | |
| filters | The filters to apply to the incoming logs. filters can be null or empty. |
References setFilters().
| void com::cosylab::logging::engine::ACS::LCEngine::addFilter | ( | Filter | filter | ) | [inline] |
Add a new filters to the vector of filters to apply to the incoming logs before sending to the listeners.
The filter is applied as active.
| filter | The not null filter to add |
References com::cosylab::logging::engine::FiltersVector::addFilter(), filters, logRetrieval, and com::cosylab::logging::engine::LogMatcher::setFilters().
Referenced by alma::acs::jlog::test::EngineFilteringTest::testAddFilter(), and alma::acs::jlog::test::EngineFilteringTest::testFiltering().
| void com::cosylab::logging::engine::ACS::LCEngine::addLogConnectionListener | ( | ACSLogConnectionListener | listener | ) | [inline] |
Add a connection listener
| listener | The listener to add |
References com::cosylab::logging::engine::ACS::ACSListenersDispatcher::addLogConnectionListener(), and listenersDispatcher.
Referenced by com::cosylab::logging::LoggingClient::getEngine(), alma::acs::logging::engine::LogReceiver::initialize(), com::cosylab::logging::LoggingClientText::initialize(), alma::acs::logtools::monitor::LogDetailsDispatcher::LogDetailsDispatcher(), alma::acs::logclient::LogListener::LogListener(), alma::acs::jlog::test::LogListener::LogListener(), and alma::acs::jlog::test::EngineFilteringTest::setUp().
| void com::cosylab::logging::engine::ACS::LCEngine::addLogErrorListener | ( | ACSRemoteErrorListener | listener | ) | [inline] |
Add an error listener
| listener | The error listener to add |
References com::cosylab::logging::engine::ACS::ACSListenersDispatcher::addErrorListener(), and listenersDispatcher.
Referenced by com::cosylab::logging::LoggingClient::getEngine(), alma::acs::logtools::monitor::LogDetailsDispatcher::LogDetailsDispatcher(), alma::acs::jlog::test::LogListener::LogListener(), and alma::acs::jlog::test::EngineFilteringTest::setUp().
| void com::cosylab::logging::engine::ACS::LCEngine::addLogListener | ( | ACSRemoteLogListener | listener | ) | [inline] |
Add a log listener
| listener | The listener to add |
References com::cosylab::logging::engine::ACS::ACSListenersDispatcher::addLogListener(), and listenersDispatcher.
Referenced by com::cosylab::logging::LoggingClient::getEngine(), alma::acs::logging::engine::LogReceiver::initialize(), com::cosylab::logging::LoggingClientText::initialize(), alma::acs::logtools::monitor::LogDetailsDispatcher::LogDetailsDispatcher(), alma::acs::jlog::test::LogEngineProfiler::LogEngineProfiler(), alma::acs::logclient::LogListener::LogListener(), alma::acs::jlog::test::LogListener::LogListener(), alma::acs::jlog::test::LogListenerStressTest::LogListenerStressTest(), and alma::acs::jlog::test::EngineFilteringTest::setUp().
| void com::cosylab::logging::engine::ACS::LCEngine::addRawLogListener | ( | ACSRemoteRawLogListener | listener | ) | [inline] |
Add a RAW log listener
| listener | The listener to add |
References com::cosylab::logging::engine::ACS::ACSListenersDispatcher::addRawLogListener(), and listenersDispatcher.
Referenced by alma::acs::logtools::monitor::LogDetailsDispatcher::LogDetailsDispatcher(), alma::acs::jlog::test::LogEngineProfiler::LogEngineProfiler(), alma::acs::logclient::LogListener::LogListener(), alma::acs::jlog::test::LogListener::LogListener(), alma::acs::jlog::test::LogListenerStressTest::LogListenerStressTest(), and alma::acs::jlog::test::EngineFilteringTest::setUp().
| void com::cosylab::logging::engine::ACS::LCEngine::clearFilters | ( | ) | [inline] |
Remove all the filters.
After calling this method, all the received logs are forwarded to the listeners.
References filters, logRetrieval, and com::cosylab::logging::engine::LogMatcher::setFilters().
Referenced by alma::acs::jlog::test::EngineFilteringTest::testAddFilter().
| synchronized void com::cosylab::logging::engine::ACS::LCEngine::close | ( | boolean | sync | ) | [inline] |
Close the engine and free the resources.
| sync | If true the closing is made in a synchronized way. |
References com::cosylab::logging::engine::ACS::ACSLogRetrieval::close(), disconnect(), and logRetrieval.
Referenced by alma::acs::jlog::test::LogEngineProfiler::addShutdownHook(), com::cosylab::logging::LoggingClient::close(), alma::acs::logtools::monitor::LogDetailsDispatcher::close(), and alma::acs::logging::engine::LogReceiver::stop().
| void com::cosylab::logging::engine::ACS::LCEngine::connect | ( | ORB | theORB, | |
| Manager | mgr | |||
| ) | [inline] |
LCEngine starts an attempt to connect to the remote system. Connection is handled in a separate Thread
| theORB | The ORB (can be null) | |
| mgr | The reference to the manager (can be null) |
References connect(), and setConnectionParams().
| void com::cosylab::logging::engine::ACS::LCEngine::connect | ( | String | newAccessType | ) | [inline] |
LCEngine starts an attempt to connect to the remote system. Connection is handled in a separate Thread
| accessTyp | The access type |
References connect(), and setAccessType().
| void com::cosylab::logging::engine::ACS::LCEngine::connect | ( | ) | [inline] |
LCEngine starts an attempt to connect to the remote system. Connection is handled in a separate Thread
References connCheckerThread, and terminateThread.
Referenced by com::cosylab::logging::LoggingClient::connect(), connect(), alma::acs::logging::engine::LogReceiver::initialize(), com::cosylab::logging::LoggingClientText::initialize(), alma::acs::logtools::monitor::LogDetailsDispatcher::LogDetailsDispatcher(), alma::acs::jlog::test::LogEngineProfiler::LogEngineProfiler(), alma::acs::logclient::LogListener::LogListener(), alma::acs::jlog::test::LogListener::LogListener(), alma::acs::jlog::test::LogListenerStressTest::LogListenerStressTest(), com::cosylab::logging::engine::ACS::LCEngine::AccessChecker::run(), and alma::acs::jlog::test::EngineFilteringTest::testFiltering().
| synchronized void com::cosylab::logging::engine::ACS::LCEngine::disconnect | ( | ) | [inline] |
LCEngine starts an attempt to connect to the remote system. Connection is handled in a separate Thread
References connCheckerThread, disconnectRA(), and terminateThread.
Referenced by close(), com::cosylab::logging::LoggingClient::connLCEngDisconnect(), alma::acs::jlog::test::LogListener::disconnect(), com::cosylab::logging::LoggingClient::disconnect(), alma::acs::jlog::test::LogListenerStressTest::disconnet(), alma::acs::logclient::LogListener::disconnet(), com::cosylab::logging::LoggingClientText::initialize(), and alma::acs::jlog::test::EngineFilteringTest::tearDown().
| void com::cosylab::logging::engine::ACS::LCEngine::disconnectRA | ( | ) | [inline, private] |
Disconnect the remote access
References accessType, com::cosylab::logging::engine::RemoteAccess::close(), com::cosylab::logging::engine::RemoteAccess::destroy(), com::cosylab::logging::engine::RemoteAccess::isInitialized(), listenersDispatcher, com::cosylab::logging::engine::ACS::ACSListenersDispatcher::publishConnected(), com::cosylab::logging::engine::ACS::ACSListenersDispatcher::publishReport(), and remoteAccess.
Referenced by disconnect(), com::cosylab::logging::engine::ACS::LCEngine::AccessChecker::run(), and com::cosylab::logging::engine::ACS::LCEngine::AccessSetter::run().
| void com::cosylab::logging::engine::ACS::LCEngine::enableAutoReconnection | ( | boolean | autoRec | ) | [inline] |
Enable/disable the auto reconnection
| autoRec | If true the engine tries to reconnect automatically |
References autoReconnect.
| void com::cosylab::logging::engine::ACS::LCEngine::enableDynamicDiscarding | ( | int | threshold, | |
| int | damping, | |||
| int | interval | |||
| ) | [inline] |
Enable or disable the dynamic change of the discard level depending on the amount of available memory.
| threashold | The discard level is increased when the available memory for the application is less then the threshold (in bytes). Integer.MAX_VALUE disables this feature. | |
| damping | The damping factor is used to avoid oscillations The discard level is decreased when the free memory is is greater then the threshold plus the dumping. | |
| interval | The time (in seconds) between two adjustments of the dynamic discard level. interval defaults to 10. |
References com::cosylab::logging::engine::ACS::ACSLogRetrieval::enableDynamicDiscarding(), and logRetrieval.
Referenced by com::cosylab::logging::LoggingClient::EventHandler::actionPerformed().
| java.lang.String com::cosylab::logging::engine::ACS::LCEngine::getAccessType | ( | ) | [inline] |
Insert the method's description here. Creation date: (2/18/2002 9:58:30 AM)
References accessType.
| LogTypeHelper com::cosylab::logging::engine::ACS::LCEngine::getActualDiscardLevel | ( | ) | [inline] |
Return the discard level in use by the engine.
Note: the actual discard level may or may not be the same discard level set by the user. They differ if the user enabled the dynamic change of the discard level depending on the available memory .
null)References com::cosylab::logging::engine::LogMatcher::getActualDiscardLevel(), and logRetrieval.
| int com::cosylab::logging::engine::ACS::LCEngine::getActualInputRate | ( | ) | [inline] |
See ACSLogRetrieval for further details.
References com::cosylab::logging::engine::ACS::ACSLogRetrieval::getInputRate(), and logRetrieval.
Referenced by com::cosylab::logging::stats::StatsDlg::refreshGUI().
| int com::cosylab::logging::engine::ACS::LCEngine::getActualOutputRate | ( | ) | [inline] |
See ACSLogRetrieval for further details.
References com::cosylab::logging::engine::ACS::ACSLogRetrieval::getOutputRate(), and logRetrieval.
Referenced by com::cosylab::logging::stats::StatsDlg::refreshGUI().
| Audience com::cosylab::logging::engine::ACS::LCEngine::getAudience | ( | ) | [inline] |
null) References com::cosylab::logging::engine::LogMatcher::getAudience(), and logRetrieval.
Referenced by alma::acs::logging::io::IOLogsHelper::LoadLogs::run().
| LogTypeHelper com::cosylab::logging::engine::ACS::LCEngine::getDiscardLevel | ( | ) | [inline] |
Return the discard level set by the user.
Note: the discard level in use can be different if the dynamic change of the discard level depending on the available memory in the engine has been activated.
null)getActualDiscardLevel() References com::cosylab::logging::engine::ACS::ACSLogRetrieval::getDiscardLevel(), and logRetrieval.
Referenced by alma::acs::logging::io::IOLogsHelper::LoadLogs::run().
| FiltersVector com::cosylab::logging::engine::ACS::LCEngine::getFilters | ( | ) | [inline] |
Return the filters to filter the incoming logs before sending to the listeners
null) Implements com::cosylab::logging::engine::Filterable.
References filters.
Referenced by alma::acs::logging::io::IOLogsHelper::LoadLogs::run(), com::cosylab::logging::LoggingClient::setEngineFilterLbl(), com::cosylab::logging::LoggingClient::showEngineFiltersDialog(), alma::acs::jlog::test::EngineFilteringTest::testAddFilter(), alma::acs::jlog::test::EngineFilteringTest::testAddFiltersVector(), and alma::acs::jlog::test::EngineFilteringTest::testFiltering().
| String com::cosylab::logging::engine::ACS::LCEngine::getFiltersString | ( | ) | [inline] |
References filters, and com::cosylab::logging::engine::FiltersVector::getFilterString().
Referenced by com::cosylab::logging::LoggingClient::setEngineFilterLbl().
| int com::cosylab::logging::engine::ACS::LCEngine::getMaxInputRate | ( | ) | [inline] |
See ACSLogRetrieval for further details.
References com::cosylab::logging::engine::ACS::ACSLogRetrieval::getMaxInputRate(), and logRetrieval.
Referenced by com::cosylab::logging::stats::StatsDlg::refreshGUI().
| int com::cosylab::logging::engine::ACS::LCEngine::getMaxOutputRate | ( | ) | [inline] |
See ACSLogRetrieval for further details.
References com::cosylab::logging::engine::ACS::ACSLogRetrieval::getMaxOutputRate(), and logRetrieval.
Referenced by com::cosylab::logging::stats::StatsDlg::refreshGUI().
| boolean com::cosylab::logging::engine::ACS::LCEngine::isConnected | ( | ) | [inline] |
References com::cosylab::logging::engine::RemoteAccess::isConnected(), and remoteAccess.
Referenced by alma::acs::jlog::test::LogEngineProfiler::addShutdownHook(), alma::acs::logging::engine::LogReceiver::isInitialized(), com::cosylab::logging::engine::ACS::LCEngine::AccessChecker::run(), and alma::acs::jlog::test::EngineFilteringTest::testFiltering().
| boolean com::cosylab::logging::engine::ACS::LCEngine::isFiltered | ( | ) | [inline] |
Return true if the engine is applying filters. If a filter is in place but not enabled then it is ignored.
true if there are filters active in the engine References filters, and com::cosylab::logging::engine::FiltersVector::hasActiveFilters().
| void com::cosylab::logging::engine::ACS::LCEngine::setAccessType | ( | String | newAccessType | ) | [inline] |
Insert the method's description here. Creation date: (2/18/2002 9:58:30 AM)
| newAccessType | java.lang.String |
References accessType.
Referenced by connect(), alma::acs::logging::engine::LogReceiver::initialize(), and com::cosylab::logging::LoggingClientText::initialize().
| void com::cosylab::logging::engine::ACS::LCEngine::setAudience | ( | Audience | newAudience | ) | [inline] |
Set the audience for the engine. If an audience is defined, a special set of filters is applied.
| newAudience | The not nullaudience |
References logRetrieval, and com::cosylab::logging::engine::LogMatcher::setAudience().
Referenced by com::cosylab::logging::LoggingClient::EventHandler::actionPerformed().
| void com::cosylab::logging::engine::ACS::LCEngine::setConnectionParams | ( | ORB | theORB, | |
| Manager | mgr | |||
| ) | [inline] |
Set the connection params fro this
| theORB | The ORB. It can't be null if the manager is not null | |
| mgr | The reference to the Manager |
Referenced by com::cosylab::logging::LoggingClient::connect(), and connect().
| void com::cosylab::logging::engine::ACS::LCEngine::setDiscardLevel | ( | LogTypeHelper | newDiscardLevel | ) | [inline] |
Set the discard level for filtering.
Note: if the dynamic change of the discard level depending on the memory usage has been activated, then the discard level effectively used by the engine might be greater then newDiscardlevel.
| newDiscardlevel | The discard level Not applied if null. |
References logRetrieval, and com::cosylab::logging::engine::ACS::ACSLogRetrieval::setDiscardLevel().
Referenced by com::cosylab::logging::LoggingClient::EventHandler::actionPerformed(), and com::cosylab::logging::LoggingClient::getEngine().
| void com::cosylab::logging::engine::ACS::LCEngine::setFilters | ( | FiltersVector | newFilters, | |
| boolean | append | |||
| ) | [inline] |
Set the filters to apply before sending the log entries to the listener. By setting a null or empty filters disable the filtering.
| newFilters | The new filters to apply If null or empty the filtering is disabled | |
| append | If true the new filters are added to the existing filters (if any). |
Implements com::cosylab::logging::engine::Filterable.
References com::cosylab::logging::engine::FiltersVector::addFilter(), com::cosylab::logging::engine::FiltersVector::clear(), filters, com::cosylab::logging::engine::FiltersVector::isActive(), logRetrieval, and com::cosylab::logging::engine::LogMatcher::setFilters().
Referenced by LCEngine(), com::cosylab::logging::LoggingClient::showEngineFiltersDialog(), and alma::acs::jlog::test::EngineFilteringTest::testAddFiltersVector().
| void com::cosylab::logging::engine::ACS::LCEngine::setMaxInputRate | ( | int | rate | ) | [inline] |
Set the max number of logs per second to accept from the RemoteAccess, typically the logging NC.
All the logs arriving after the max number has been reached will be discarded, regardless of their level.
See ACSLogRetrieval for further details.
| rate | The max number of logs per second to accept |
References logRetrieval, and com::cosylab::logging::engine::ACS::ACSLogRetrieval::setMaxInputRate().
Referenced by com::cosylab::logging::LoggingClient::EventHandler::actionPerformed().
| void com::cosylab::logging::engine::ACS::LCEngine::setMaxOutputRate | ( | int | rate | ) | [inline] |
Set the max number of logs to publish to listeners.
When this number has been reached, no more logs are sent to the listeners.
See ACSLogRetrieval for further details.
| rate | The max number of logs per second to accept |
References logRetrieval, and com::cosylab::logging::engine::ACS::ACSLogRetrieval::setMaxOutputRate().
Referenced by com::cosylab::logging::LoggingClient::EventHandler::actionPerformed().
| void com::cosylab::logging::engine::ACS::LCEngine::setPaused | ( | boolean | pause | ) | [inline] |
Pause/unpause the publishing of logs to the listener The difference between pause and suspended is that when the engine is suspended all the received logs are discarded. When it is paused, the received logs are cached and published when the engine will be unpaused.
| pause |
References logRetrieval, and com::cosylab::logging::engine::ACS::ACSLogRetrieval::pause().
Referenced by com::cosylab::logging::LoggingClient::EventHandler::actionPerformed(), com::cosylab::logging::LoggingClient::pause(), and com::cosylab::logging::LoggingClient::resume().
| void com::cosylab::logging::engine::ACS::LCEngine::setSupended | ( | boolean | suspended | ) | [inline] |
Suspend resume the notification of logs NOTE: When suspended the log discarded are lost forever
| suspended | If true suspend the notification of the logs |
References remoteAccess.
Referenced by com::cosylab::logging::LoggingClient::EventHandler::actionPerformed(), and com::cosylab::logging::LoggingClient::connect().
| int com::cosylab::logging::engine::ACS::LCEngine::waitingLogsNumber | ( | ) | [inline] |
Return the number of logs waiting in the cache i.e. the logs received from the RemoteAcess and not yet sent to the listeners.
References logRetrieval, and com::cosylab::logging::engine::ACS::ACSLogRetrieval::size().
String com::cosylab::logging::engine::ACS::LCEngine::accessType = "ACS" [private] |
accessType, orb and manager are used to connect to the logging channel
Referenced by disconnectRA(), getAccessType(), com::cosylab::logging::engine::ACS::LCEngine::AccessSetter::run(), and setAccessType().
boolean com::cosylab::logging::engine::ACS::LCEngine::autoReconnect = false [private] |
If true the engine tries to reconnect automatically
Referenced by enableAutoReconnection(), LCEngine(), and com::cosylab::logging::engine::ACS::LCEngine::AccessChecker::run().
final int com::cosylab::logging::engine::ACS::LCEngine::CHECK_INTERVAL = 15 [private] |
The connection is checked every CHECK_INTERVAL seconds
Referenced by com::cosylab::logging::engine::ACS::LCEngine::AccessChecker::run().
Referenced by connect(), and disconnect().
FiltersVector com::cosylab::logging::engine::ACS::LCEngine::filters = null [private] |
The filters to apply to the incoming logs.
The filters are applied by ACSLogReceiver.run()
Referenced by addFilter(), clearFilters(), getFilters(), getFiltersString(), isFiltered(), and setFilters().
Referenced by addFilter(), clearFilters(), close(), enableDynamicDiscarding(), getActualDiscardLevel(), getActualInputRate(), getActualOutputRate(), getAudience(), getDiscardLevel(), getMaxInputRate(), getMaxOutputRate(), LCEngine(), com::cosylab::logging::engine::ACS::LCEngine::AccessSetter::run(), setAudience(), setDiscardLevel(), setFilters(), setMaxInputRate(), setMaxOutputRate(), setPaused(), and waitingLogsNumber().
Manager com::cosylab::logging::engine::ACS::LCEngine::manager = null [private] |
ORB com::cosylab::logging::engine::ACS::LCEngine::orb = null [private] |
RemoteAccess com::cosylab::logging::engine::ACS::LCEngine::remoteAccess = null [private] |
boolean com::cosylab::logging::engine::ACS::LCEngine::terminateThread = false [private] |
Referenced by connect(), disconnect(), and com::cosylab::logging::engine::ACS::LCEngine::AccessChecker::run().
boolean com::cosylab::logging::engine::ACS::LCEngine::wasConnected = false [private] |
1.6.2