
Classes | |
| class | ChangeListener |
Public Member Functions | |
| CDBAccess (Logger logger) | |
| CDBAccess (ORB orb, Logger logger) | |
| DAOProxy | createDAO (String curl) |
| String[] | getSubNodes (DAOProxy proxy) throws Throwable |
| String[] | getSubNodes (DAOProxy proxy, String subnode) throws Throwable |
| void | readConfiguration () |
| void | destroy () |
| void | setDAL (DAL dal) |
| DAL | getDAL () |
| DAL | connectAndGetDAL () |
Private Member Functions | |
| void | internalConnect (DAOProxy proxy) |
| void | checkDALConnection () |
| void | internalDisconnect (DAOProxy proxy) |
Private Attributes | |
| boolean | remoteDAO = true |
| String | defaultDAL = null |
| DAL | dalReference = null |
| ORB | orb = null |
| final Logger | logger |
| ChangeListener | changeListener = null |
Static Private Attributes | |
| static final String | CDBDAL_PREFIX = "DAL" |
| static final String | CDBDAO_PREFIX = "DAO" |
| static final String | CDBDAL_DEFAULT_REFERENCE = CDBDAL_PREFIX + ".defaultReference" |
| static final String | DEFAULT_REFERENCE = "corbaloc::" + ACSPorts.getIP() + ":" + ACSPorts.getCDBPort() + "/CDB" |
| static final String | CDBDAO_REMOTE = CDBDAO_PREFIX + ".remote" |
Class managing CDB access (establishing connection to the CDB, observing DAO changes, and providing accessor methods to the user).
| com::cosylab::cdb::client::CDBAccess::CDBAccess | ( | Logger | logger | ) | [inline] |
Constructor used only when setDAL(DAL) is called afterwards.
| logger | logger. |
| com::cosylab::cdb::client::CDBAccess::CDBAccess | ( | ORB | orb, | |
| Logger | logger | |||
| ) | [inline] |
Constructor.
| orb | CORBA ORB. | |
| logger | logger. |
References changeListener, and readConfiguration().
| void com::cosylab::cdb::client::CDBAccess::checkDALConnection | ( | ) | [inline, private] |
Checks connection status (if already connected) and connects if necessary.
References dalReference, defaultDAL, logger, and orb.
Referenced by connectAndGetDAL(), getSubNodes(), and internalConnect().
| DAL com::cosylab::cdb::client::CDBAccess::connectAndGetDAL | ( | ) | [inline] |
Active (connects if necessary) DAL accessor.
null if failed to connect. References checkDALConnection(), and dalReference.
Referenced by com::cosylab::acs::maci::manager::app::ManagerEngine::initializeManager().
| DAOProxy com::cosylab::cdb::client::CDBAccess::createDAO | ( | String | curl | ) | [inline] |
Performs the connect of the specified DAO.
| curl | DAO curl, non-null |
| RuntimeException | on failure |
References internalConnect().
Referenced by com::cosylab::acs::maci::manager::ManagerImpl::createDAO(), and alma::acs::nc::Helper::getNotificationFactoryNameForChannel().
| void com::cosylab::cdb::client::CDBAccess::destroy | ( | ) | [inline] |
Destroys.
References changeListener, and com::cosylab::cdb::client::CDBAccess::ChangeListener::destroy().
Referenced by com::cosylab::acs::maci::manager::ManagerImpl::setCDBAccess().
| DAL com::cosylab::cdb::client::CDBAccess::getDAL | ( | ) | [inline] |
DAL accessor.
References dalReference.
Referenced by com::cosylab::cdb::jdal::hibernate::plugin::HibernateWDALAlarmPluginImpl::importEpilogue(), and com::cosylab::acs::maci::manager::app::ManagerEngine::initializeManager().
| String [] com::cosylab::cdb::client::CDBAccess::getSubNodes | ( | DAOProxy | proxy, | |
| String | subnode | |||
| ) | throws Throwable [inline] |
Helper method to get all subnodes of the current proxy, removes ".xml" element from the list.
| proxy | proxy whose subnodes to return. | |
| subnode | proxy subnode to be queried |
| Throwable | exception on failure (e.g. connection failure, etc.) |
References checkDALConnection(), dalReference, and com::cosylab::CDB::DALOperations::list_nodes().
| String [] com::cosylab::cdb::client::CDBAccess::getSubNodes | ( | DAOProxy | proxy | ) | throws Throwable [inline] |
Helper method to get all subnodes of the current proxy, removes ".xml" element from the list.
| proxy | proxy whose subnodes to return. |
| Throwable | exception on failure (e.g. connection failure, etc.) |
Referenced by com::cosylab::acs::maci::manager::ManagerImpl::refreshComponentsList().
| void com::cosylab::cdb::client::CDBAccess::internalConnect | ( | DAOProxy | proxy | ) | [inline, private] |
Performs the connect of the specified DAO.
| proxy | the proxy to connect, non-null |
References changeListener, checkDALConnection(), dalReference, com::cosylab::CDB::DALOperations::get_DAO(), com::cosylab::CDB::DALOperations::get_DAO_Servant(), com::cosylab::cdb::client::DAOProxy::getCURL(), com::cosylab::cdb::jdal::XMLTreeNode::getName(), com::cosylab::cdb::client::CDBAccess::ChangeListener::handle(), com::cosylab::cdb::client::DAOProxy::initialize(), com::cosylab::cdb::client::CDBAccess::ChangeListener::isRegistered(), logger, com::cosylab::cdb::jdal::XMLHandler::m_errorString, com::cosylab::cdb::jdal::XMLHandler::m_rootNode, remoteDAO, com::cosylab::cdb::client::DAOProxy::setElementName(), and alma::cdbErrType::wrappers::AcsJCDBXMLErrorEx::setErrorString().
Referenced by createDAO(), and com::cosylab::cdb::client::CDBAccess::ChangeListener::ReconnectTask::run().
| void com::cosylab::cdb::client::CDBAccess::internalDisconnect | ( | DAOProxy | proxy | ) | [inline, private] |
Sets the DAO of the proxy to null
| proxy | the proxy to disconnect, non-null |
References com::cosylab::cdb::client::DAOProxy::initialize().
| void com::cosylab::cdb::client::CDBAccess::readConfiguration | ( | ) | [inline] |
Interprets the configuration delivered by System JVM properties.
References CDBDAL_DEFAULT_REFERENCE, CDBDAO_REMOTE, DEFAULT_REFERENCE, defaultDAL, and remoteDAO.
Referenced by CDBAccess().
| void com::cosylab::cdb::client::CDBAccess::setDAL | ( | DAL | dal | ) | [inline] |
DAL setter.
| dal | DAL reference. |
References dalReference.
Referenced by alma::acs::nc::Helper::Helper().
final String com::cosylab::cdb::client::CDBAccess::CDBDAL_DEFAULT_REFERENCE = CDBDAL_PREFIX + ".defaultReference" [static, private] |
The constant denoting the name of default DAL reference property key.
Referenced by readConfiguration().
final String com::cosylab::cdb::client::CDBAccess::CDBDAL_PREFIX = "DAL" [static, private] |
The constant denoting the prefix of the DAL configuration keys.
final String com::cosylab::cdb::client::CDBAccess::CDBDAO_PREFIX = "DAO" [static, private] |
The constant denoting the prefix of the DAO configuration keys.
final String com::cosylab::cdb::client::CDBAccess::CDBDAO_REMOTE = CDBDAO_PREFIX + ".remote" [static, private] |
The constant denoting the name of default DAO remote switch property key.
Referenced by readConfiguration().
ChangeListener com::cosylab::cdb::client::CDBAccess::changeListener = null [private] |
Listener for CDB change.
Referenced by CDBAccess(), destroy(), com::cosylab::cdb::client::CDBAccess::ChangeListener::handle(), and internalConnect().
DAL com::cosylab::cdb::client::CDBAccess::dalReference = null [private] |
DAL reference.
Referenced by checkDALConnection(), connectAndGetDAL(), getDAL(), getSubNodes(), internalConnect(), and setDAL().
final String com::cosylab::cdb::client::CDBAccess::DEFAULT_REFERENCE = "corbaloc::" + ACSPorts.getIP() + ":" + ACSPorts.getCDBPort() + "/CDB" [static, private] |
The constant denoting the default DAL reference (if non is set).
Referenced by readConfiguration().
String com::cosylab::cdb::client::CDBAccess::defaultDAL = null [private] |
Default DAL CORBA reference (if not authority is specified).
Referenced by checkDALConnection(), and readConfiguration().
final Logger com::cosylab::cdb::client::CDBAccess::logger [private] |
Logger.
Referenced by checkDALConnection(), and internalConnect().
ORB com::cosylab::cdb::client::CDBAccess::orb = null [private] |
CORBA Object Request Broker (ORB) reference.
Referenced by checkDALConnection(), and com::cosylab::cdb::client::CDBAccess::ChangeListener::handle().
boolean com::cosylab::cdb::client::CDBAccess::remoteDAO = true [private] |
Switch to turn remote DAO on.
Referenced by internalConnect(), and readConfiguration().
1.6.2