
Public Types | |
| enum | DBState { DATABASE_OK = ("/databaseLink.png"), DATABASE_NOP = ("/databaseNOP.png"), DATABASE_WORKING = ("/databaseBusy.png") } |
Public Member Functions | |
| ArchiveConnectionManager (LoggingClient loggingClient) | |
| DBState | getDBStatus () |
| Collection | getLogs (String from, String to, short minType, short maxType, String routine, String source, String process, int maxRows) throws Exception |
Private Member Functions | |
| Object | loadArchiveClass () |
| Method | getMethod (Object obj) |
| void | showDBStatus (String msg) |
Private Attributes | |
| final String | ARCHIVE_CLASS_NAME = "alma.archive.logging.ArchiveLoggingQuery" |
| final String | METHOD_NAME = "getLog" |
| DBState | status |
| Object | archive = null |
| Method | getLogMethod |
| LoggingClient | logging |
A class to connect and interact with the archive
The connection with the database is not always available. There are 2 possibilities: 1. the code to connect to the DB is not available (it comes from a module in ARCHIVE) 2. the code is available but for some reason something in the communication with the DB doesn't work as expected
| alma::acs::logging::archive::ArchiveConnectionManager::ArchiveConnectionManager | ( | LoggingClient | loggingClient | ) | [inline] |
Constructor
| loggingClient | The logging client |
References archive, getLogMethod, getMethod(), loadArchiveClass(), logging, showDBStatus(), and status.
| DBState alma::acs::logging::archive::ArchiveConnectionManager::getDBStatus | ( | ) | [inline] |
References com::cosylab::logging::LoggingClient::inDebugMode(), logging, and status.
Referenced by com::cosylab::logging::LoggingClient::EventHandler::actionPerformed(), alma::acs::logging::archive::QueryDlg::initGUI(), and com::cosylab::logging::LoggingClient::EventHandler::menuSelected().
| Collection alma::acs::logging::archive::ArchiveConnectionManager::getLogs | ( | String | from, | |
| String | to, | |||
| short | minType, | |||
| short | maxType, | |||
| String | routine, | |||
| String | source, | |||
| String | process, | |||
| int | maxRows | |||
| ) | throws Exception [inline] |
Get the logs from the archive
| from | Start time | |
| to | End time | |
| minType | Minimum log type | |
| maxType | Maximum log type | |
| routine | The routine name | |
| source | The source | |
| process | The process | |
| maxRows | Max number of logs to read from the database |
| Exception |
References archive, getLogMethod, showDBStatus(), and status.
Referenced by alma::acs::logging::archive::QueryDlg::submitQuery().
| Method alma::acs::logging::archive::ArchiveConnectionManager::getMethod | ( | Object | obj | ) | [inline, private] |
Get the method to retrieve log from the database
| obj | The object containing the method |
References ARCHIVE_CLASS_NAME, and METHOD_NAME.
Referenced by ArchiveConnectionManager().
| Object alma::acs::logging::archive::ArchiveConnectionManager::loadArchiveClass | ( | ) | [inline, private] |
Load the class to talk with the archive
References ARCHIVE_CLASS_NAME.
Referenced by ArchiveConnectionManager().
| void alma::acs::logging::archive::ArchiveConnectionManager::showDBStatus | ( | String | msg | ) | [inline, private] |
Notify the LoggingClient about the status of the connection with the database
The icon in the LC is set depending on the actual state of the connection. The tooltip of the icon is set equal to the msg parameter
| msg | A message to show as tool tip in the icon of the status of the DB connection |
References logging, com::cosylab::logging::LoggingClient::showDBStatus(), and status.
Referenced by ArchiveConnectionManager(), and getLogs().
Object alma::acs::logging::archive::ArchiveConnectionManager::archive = null [private] |
The class to talk to the archive
Referenced by ArchiveConnectionManager(), and getLogs().
final String alma::acs::logging::archive::ArchiveConnectionManager::ARCHIVE_CLASS_NAME = "alma.archive.logging.ArchiveLoggingQuery" [private] |
The name of the class, the method and so on to load.
Generated by ARCHIVE and could not be present at run time
Referenced by getMethod(), and loadArchiveClass().
Method alma::acs::logging::archive::ArchiveConnectionManager::getLogMethod [private] |
The method to get logs from the database
Referenced by ArchiveConnectionManager(), and getLogs().
The application
Referenced by ArchiveConnectionManager(), getDBStatus(), and showDBStatus().
final String alma::acs::logging::archive::ArchiveConnectionManager::METHOD_NAME = "getLog" [private] |
The name of the method to read logs from the database
Generated by ARCHIVE and could not be present at run time
Referenced by getMethod().
The status of the connection with the DB
Referenced by ArchiveConnectionManager(), getDBStatus(), getLogs(), and showDBStatus().
1.6.2