Public Member Functions | |
LogDetailsDispatcher () | |
void | errorReceived (String xml) |
void | xmlEntryReceived (String xmlLogString) |
void | acsLogConnConnecting () |
void | acsLogConnDisconnected () |
void | acsLogConnEstablished () |
void | acsLogConnLost () |
void | acsLogConnSuspended () |
void | acsLogsDelay () |
void | reportStatus (String status) |
void | logEntryReceived (ILogEntry logEntry) |
void | addNumsListener (LogNumbersListener listener) |
void | removeNumsListener (LogNumbersListener listener) |
void | run () |
void | close () |
Static Public Attributes | |
static final int | NUMBER_LISTENERS_INTERVAL = 10 |
LogDetailsDispatcher reads logs from the logging NC and dispatch them to the registered listeners.
There are 2 types of listeners to perform different kind of statistics:
alma.acs.logtools.monitor.LogDetailsDispatcher.LogDetailsDispatcher | ( | ) |
Constructor
References com.cosylab.logging.engine.ACS.LCEngine.addLogConnectionListener(), com.cosylab.logging.engine.ACS.LCEngine.addLogErrorListener(), com.cosylab.logging.engine.ACS.LCEngine.addLogListener(), com.cosylab.logging.engine.ACS.LCEngine.addRawLogListener(), and com.cosylab.logging.engine.ACS.LCEngine.connect().
void alma.acs.logtools.monitor.LogDetailsDispatcher.acsLogConnConnecting | ( | ) |
Notify that an attempt to connect to ACS NC is in progress
Implements com.cosylab.logging.engine.ACS.ACSLogConnectionListener.
void alma.acs.logtools.monitor.LogDetailsDispatcher.acsLogConnDisconnected | ( | ) |
Notify that the connection with ACS NC has been disconnected It can happen as a consequence of an error as well as as consequence of a request
Implements com.cosylab.logging.engine.ACS.ACSLogConnectionListener.
void alma.acs.logtools.monitor.LogDetailsDispatcher.acsLogConnEstablished | ( | ) |
Notify that the connection with ACS NC has been established
Implements com.cosylab.logging.engine.ACS.ACSLogConnectionListener.
void alma.acs.logtools.monitor.LogDetailsDispatcher.acsLogConnLost | ( | ) |
Notify that the connection with ACS NC has been lost (it means an error or something abnormal).
Implements com.cosylab.logging.engine.ACS.ACSLogConnectionListener.
void alma.acs.logtools.monitor.LogDetailsDispatcher.acsLogConnSuspended | ( | ) |
Notify that the service is supended (i.e. it is connected to the NC and receiving logs but the logs are discarded instead of being sent to the listeners) Note: the suspension of the service is not a malfunctioning but a status requested by the user
Implements com.cosylab.logging.engine.ACS.ACSLogConnectionListener.
void alma.acs.logtools.monitor.LogDetailsDispatcher.acsLogsDelay | ( | ) |
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.logtools.monitor.LogDetailsDispatcher.addNumsListener | ( | LogNumbersListener | listener | ) |
Add a LogNumbersListener listener to be notified about incoming logs statistics
listener | The listener to add |
Referenced by alma.acs.logtools.monitor.LogMonitor.LogMonitor().
void alma.acs.logtools.monitor.LogDetailsDispatcher.close | ( | ) |
Close the engine and free the resources
References com.cosylab.logging.engine.ACS.LCEngine.close().
Referenced by alma.acs.logtools.monitor.LogMonitor.close().
void alma.acs.logtools.monitor.LogDetailsDispatcher.errorReceived | ( | String | xml | ) |
void alma.acs.logtools.monitor.LogDetailsDispatcher.logEntryReceived | ( | ILogEntry | logEntry | ) |
void alma.acs.logtools.monitor.LogDetailsDispatcher.removeNumsListener | ( | LogNumbersListener | listener | ) |
Remove a LogNumbersListener listener.
listener | The listener to remove |
Referenced by alma.acs.logtools.monitor.LogMonitor.close().
void alma.acs.logtools.monitor.LogDetailsDispatcher.reportStatus | ( | String | status | ) |
Send a report string with the current status of the connection
status | The status string |
Implements com.cosylab.logging.engine.ACS.ACSLogConnectionListener.
void alma.acs.logtools.monitor.LogDetailsDispatcher.run | ( | ) |
The thread notifying listeners about statistics
References alma.acs.logtools.monitor.LogDetailsDispatcher.NUMBER_LISTENERS_INTERVAL.
void alma.acs.logtools.monitor.LogDetailsDispatcher.xmlEntryReceived | ( | String | xmlLogString | ) |
final int alma.acs.logtools.monitor.LogDetailsDispatcher.NUMBER_LISTENERS_INTERVAL = 10 [static] |
The interval of time (seconds) to notify listener of numbers
Referenced by alma.acs.logtools.monitor.LogDetailsDispatcher.run().