Classes | |
class | AccessChecker |
class | AccessSetter |
Public Member Functions | |
LCEngine () | |
LCEngine (boolean autoReconn) | |
LCEngine (boolean autoReconn, FiltersVector filters) | |
LCEngine (ILogQueueFileHandler cacheFileHandler) | |
LCEngine (boolean autoReconn, ILogQueueFileHandler cacheFileHandler) | |
LCEngine (boolean autoReconn, FiltersVector filters, ILogQueueFileHandler cacheFileHandler) | |
void | connect () |
void | connect (String newAccessType) |
void | connect (ORB theORB, Manager mgr) |
synchronized void | close (boolean sync) |
synchronized void | disconnect () |
java.lang.String | getAccessType () |
void | setAccessType (String newAccessType) |
void | setConnectionParams (ORB theORB, Manager mgr) |
boolean | isConnected () |
void | setSupended (boolean suspended) |
void | enableAutoReconnection (boolean autoRec) |
void | setPaused (boolean pause) |
void | addLogListener (ACSRemoteLogListener listener) |
void | addRawLogListener (ACSRemoteRawLogListener listener) |
void | addLogErrorListener (ACSRemoteErrorListener listener) |
void | addLogConnectionListener (ACSLogConnectionListener listener) |
void | setFilters (FiltersVector newFilters, boolean append) |
void | setDiscardLevel (LogTypeHelper newDiscardLevel) |
void | setAudience (Audience newAudience) |
void | addFilter (Filter filter) |
void | clearFilters () |
FiltersVector | getFilters () |
LogTypeHelper | getActualDiscardLevel () |
LogTypeHelper | getDiscardLevel () |
Audience | getAudience () |
boolean | isFiltered () |
String | getFiltersString () |
void | setMaxInputRate (int rate) |
int | getMaxInputRate () |
int | getActualInputRate () |
void | setMaxOutputRate (int rate) |
int | getMaxOutputRate () |
int | getActualOutputRate () |
int | waitingLogsNumber () |
void | enableDynamicDiscarding (int threshold, int damping, int interval) |
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 | ( | ) |
LCEngine constructor
com.cosylab.logging.engine.ACS.LCEngine.LCEngine | ( | boolean | autoReconn | ) |
LCEngine constructor.
autoReconn | If true the engine automatically reconnects |
com.cosylab.logging.engine.ACS.LCEngine.LCEngine | ( | boolean | autoReconn, | |
FiltersVector | filters | |||
) |
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 com.cosylab.logging.engine.ACS.LCEngine.setFilters().
com.cosylab.logging.engine.ACS.LCEngine.LCEngine | ( | ILogQueueFileHandler | cacheFileHandler | ) |
Build the LCEngine
by setting an handler for the files of the cache.
cacheFileHandler | The handler of the files of the cache |
com.cosylab.logging.engine.ACS.LCEngine.LCEngine | ( | boolean | autoReconn, | |
ILogQueueFileHandler | cacheFileHandler | |||
) |
LCEngine
constructor.
autoReconn | If true the engine automatically reconnects | |
cacheFileHandler | The handler of the files of the cache |
com.cosylab.logging.engine.ACS.LCEngine.LCEngine | ( | boolean | autoReconn, | |
FiltersVector | filters, | |||
ILogQueueFileHandler | cacheFileHandler | |||
) |
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 also be null or empty. | |
cacheFileHandler | The handler of the files of the cache |
References com.cosylab.logging.engine.ACS.LCEngine.setFilters().
void com.cosylab.logging.engine.ACS.LCEngine.addFilter | ( | Filter | filter | ) |
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(), and com.cosylab.logging.engine.LogMatcher.setFilters().
void com.cosylab.logging.engine.ACS.LCEngine.addLogConnectionListener | ( | ACSLogConnectionListener | listener | ) |
Add a connection listener
listener | The listener to add |
References com.cosylab.logging.engine.ACS.ACSListenersDispatcher.addLogConnectionListener().
Referenced by com.cosylab.logging.LoggingClient.getEngine(), alma.acs.logging.engine.LogReceiver.initialize(), and alma.acs.logtools.monitor.LogDetailsDispatcher.LogDetailsDispatcher().
void com.cosylab.logging.engine.ACS.LCEngine.addLogErrorListener | ( | ACSRemoteErrorListener | listener | ) |
Add an error listener
listener | The error listener to add |
References com.cosylab.logging.engine.ACS.ACSListenersDispatcher.addErrorListener().
Referenced by com.cosylab.logging.LoggingClient.getEngine(), and alma.acs.logtools.monitor.LogDetailsDispatcher.LogDetailsDispatcher().
void com.cosylab.logging.engine.ACS.LCEngine.addLogListener | ( | ACSRemoteLogListener | listener | ) |
Add a log listener
listener | The listener to add |
References com.cosylab.logging.engine.ACS.ACSListenersDispatcher.addLogListener().
Referenced by com.cosylab.logging.LoggingClient.getEngine(), alma.acs.logging.engine.LogReceiver.initialize(), and alma.acs.logtools.monitor.LogDetailsDispatcher.LogDetailsDispatcher().
void com.cosylab.logging.engine.ACS.LCEngine.addRawLogListener | ( | ACSRemoteRawLogListener | listener | ) |
Add a RAW log listener
listener | The listener to add |
References com.cosylab.logging.engine.ACS.ACSListenersDispatcher.addRawLogListener().
Referenced by alma.acs.logtools.monitor.LogDetailsDispatcher.LogDetailsDispatcher().
void com.cosylab.logging.engine.ACS.LCEngine.clearFilters | ( | ) |
Remove all the filters.
After calling this method, all the received logs are forwarded to the listeners.
References com.cosylab.logging.engine.LogMatcher.setFilters().
synchronized void com.cosylab.logging.engine.ACS.LCEngine.close | ( | boolean | sync | ) |
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(), and com.cosylab.logging.engine.ACS.LCEngine.disconnect().
Referenced by 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 | ( | ) |
LCEngine starts an attempt to connect to the remote system. Connection is handled in a separate Thread
Referenced by com.cosylab.logging.LoggingClient.connect(), com.cosylab.logging.engine.ACS.LCEngine.connect(), alma.acs.logging.engine.LogReceiver.initialize(), and alma.acs.logtools.monitor.LogDetailsDispatcher.LogDetailsDispatcher().
void com.cosylab.logging.engine.ACS.LCEngine.connect | ( | String | newAccessType | ) |
LCEngine starts an attempt to connect to the remote system. Connection is handled in a separate Thread
accessTyp | The access type |
References com.cosylab.logging.engine.ACS.LCEngine.connect(), and com.cosylab.logging.engine.ACS.LCEngine.setAccessType().
void com.cosylab.logging.engine.ACS.LCEngine.connect | ( | ORB | theORB, | |
Manager | mgr | |||
) |
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 com.cosylab.logging.engine.ACS.LCEngine.connect(), and com.cosylab.logging.engine.ACS.LCEngine.setConnectionParams().
synchronized void com.cosylab.logging.engine.ACS.LCEngine.disconnect | ( | ) |
LCEngine starts an attempt to connect to the remote system. Connection is handled in a separate Thread
Referenced by com.cosylab.logging.engine.ACS.LCEngine.close(), and com.cosylab.logging.LoggingClient.connLCEngDisconnect().
void com.cosylab.logging.engine.ACS.LCEngine.enableAutoReconnection | ( | boolean | autoRec | ) |
Enable/disable the auto reconnection
autoRec | If true the engine tries to reconnect automatically |
void com.cosylab.logging.engine.ACS.LCEngine.enableDynamicDiscarding | ( | int | threshold, | |
int | damping, | |||
int | interval | |||
) |
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().
Referenced by com.cosylab.logging.LoggingClient.EventHandler.actionPerformed().
java.lang.String com.cosylab.logging.engine.ACS.LCEngine.getAccessType | ( | ) |
Insert the method's description here. Creation date: (2/18/2002 9:58:30 AM)
LogTypeHelper com.cosylab.logging.engine.ACS.LCEngine.getActualDiscardLevel | ( | ) |
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().
int com.cosylab.logging.engine.ACS.LCEngine.getActualInputRate | ( | ) |
See ACSLogRetrieval for further details.
References com.cosylab.logging.engine.ACS.ACSLogRetrieval.getInputRate().
int com.cosylab.logging.engine.ACS.LCEngine.getActualOutputRate | ( | ) |
See ACSLogRetrieval for further details.
References com.cosylab.logging.engine.ACS.ACSLogRetrieval.getOutputRate().
Audience com.cosylab.logging.engine.ACS.LCEngine.getAudience | ( | ) |
null
) References com.cosylab.logging.engine.LogMatcher.getAudience().
LogTypeHelper com.cosylab.logging.engine.ACS.LCEngine.getDiscardLevel | ( | ) |
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().
FiltersVector com.cosylab.logging.engine.ACS.LCEngine.getFilters | ( | ) |
Return the filters to filter the incoming logs before sending to the listeners
null
) Implements com.cosylab.logging.engine.Filterable.
String com.cosylab.logging.engine.ACS.LCEngine.getFiltersString | ( | ) |
References com.cosylab.logging.engine.FiltersVector.getFilterString().
int com.cosylab.logging.engine.ACS.LCEngine.getMaxInputRate | ( | ) |
See ACSLogRetrieval for further details.
References com.cosylab.logging.engine.ACS.ACSLogRetrieval.getMaxInputRate().
int com.cosylab.logging.engine.ACS.LCEngine.getMaxOutputRate | ( | ) |
See ACSLogRetrieval for further details.
References com.cosylab.logging.engine.ACS.ACSLogRetrieval.getMaxOutputRate().
boolean com.cosylab.logging.engine.ACS.LCEngine.isConnected | ( | ) |
References com.cosylab.logging.engine.RemoteAccess.isConnected().
Referenced by alma.acs.logging.engine.LogReceiver.isInitialized().
boolean com.cosylab.logging.engine.ACS.LCEngine.isFiltered | ( | ) |
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 com.cosylab.logging.engine.FiltersVector.hasActiveFilters().
void com.cosylab.logging.engine.ACS.LCEngine.setAccessType | ( | String | newAccessType | ) |
Insert the method's description here. Creation date: (2/18/2002 9:58:30 AM)
newAccessType | java.lang.String |
Referenced by com.cosylab.logging.engine.ACS.LCEngine.connect(), and alma.acs.logging.engine.LogReceiver.initialize().
void com.cosylab.logging.engine.ACS.LCEngine.setAudience | ( | Audience | newAudience | ) |
Set the audience for the engine. If an audience is defined, a special set of filters is applied.
newAudience | The not null audience |
References 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 | |||
) |
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 com.cosylab.logging.engine.ACS.LCEngine.connect().
void com.cosylab.logging.engine.ACS.LCEngine.setDiscardLevel | ( | LogTypeHelper | newDiscardLevel | ) |
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 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 | |||
) |
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(), com.cosylab.logging.engine.FiltersVector.isActive(), and com.cosylab.logging.engine.LogMatcher.setFilters().
Referenced by com.cosylab.logging.engine.ACS.LCEngine.LCEngine().
void com.cosylab.logging.engine.ACS.LCEngine.setMaxInputRate | ( | int | rate | ) |
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 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 | ) |
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 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 | ) |
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 com.cosylab.logging.engine.ACS.ACSLogRetrieval.pause().
Referenced by com.cosylab.logging.LoggingClient.pause(), and com.cosylab.logging.LoggingClient.resume().
void com.cosylab.logging.engine.ACS.LCEngine.setSupended | ( | boolean | suspended | ) |
Suspend resume the notification of logs NOTE: When suspended the log discarded are lost forever
suspended | If true suspend the notification of the logs |
Referenced by com.cosylab.logging.LoggingClient.EventHandler.actionPerformed(), and com.cosylab.logging.LoggingClient.connect().
int com.cosylab.logging.engine.ACS.LCEngine.waitingLogsNumber | ( | ) |
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 com.cosylab.logging.engine.ACS.ACSLogRetrieval.size().