Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

com::cosylab::cdb::client::CDBAccess Class Reference

Collaboration diagram for com::cosylab::cdb::client::CDBAccess:

Collaboration graph
[legend]
List of all members.

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
Logger logger = null
ChangeListener changeListener = null

Static Private Attributes

final String CDBDAL_PREFIX = "DAL"
final String CDBDAO_PREFIX = "DAO"
final String CDBDAL_DEFAULT_REFERENCE = CDBDAL_PREFIX + ".defaultReference"
final String DEFAULT_REFERENCE = "corbaloc::" + ACSPorts.getIP() + ":" + ACSPorts.getCDBPort() + "/CDB"
final String CDBDAO_REMOTE = CDBDAO_PREFIX + ".remote"

Detailed Description

Class managing CDB access (establishing connection to the CDB, observing DAO changes, and providing accessor methods to the user).

Author:
Matej Sekoranja (matej.sekoranja@cosylab.com)
Version:
@VERSION@


Constructor & Destructor Documentation

com::cosylab::cdb::client::CDBAccess::CDBAccess Logger  logger  )  [inline]
 

Constructor used only when setDAL(DAL) is called afterwards.

Parameters:
logger logger.

com::cosylab::cdb::client::CDBAccess::CDBAccess ORB  orb,
Logger  logger
[inline]
 

Constructor.

Parameters:
orb CORBA ORB.
logger logger.


Member Function Documentation

void com::cosylab::cdb::client::CDBAccess::checkDALConnection  )  [inline, private]
 

Checks connection status (if already connected) and connects if necessary.

DAL com::cosylab::cdb::client::CDBAccess::connectAndGetDAL  )  [inline]
 

Active (connects if necessary) DAL accessor.

Returns:
DAL reference, null if failed to connect.

DAOProxy com::cosylab::cdb::client::CDBAccess::createDAO String  curl  )  [inline]
 

Performs the connect of the specified DAO.

Parameters:
curl DAO curl, non-null
Returns:
DAO proxy.
Exceptions:
RuntimeException on failure

void com::cosylab::cdb::client::CDBAccess::destroy  )  [inline]
 

Destroys.

DAL com::cosylab::cdb::client::CDBAccess::getDAL  )  [inline]
 

DAL accessor.

Returns:
DAL reference.

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.

Parameters:
proxy proxy whose subnodes to return.
subnode proxy subnode to be queried
Returns:
array of subnodes.
Exceptions:
Throwable exception on failure (e.g. connection failure, etc.)

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.

Parameters:
proxy proxy whose subnodes to return.
Returns:
array of subnodes.
Exceptions:
Throwable exception on failure (e.g. connection failure, etc.)

void com::cosylab::cdb::client::CDBAccess::internalConnect DAOProxy  proxy  )  [inline, private]
 

Performs the connect of the specified DAO.

Parameters:
proxy the proxy to connect, non-null

void com::cosylab::cdb::client::CDBAccess::internalDisconnect DAOProxy  proxy  )  [inline, private]
 

Sets the DAO of the proxy to null

Parameters:
proxy the proxy to disconnect, non-null

void com::cosylab::cdb::client::CDBAccess::readConfiguration  )  [inline]
 

Interprets the configuration delivered by System JVM properties.

void com::cosylab::cdb::client::CDBAccess::setDAL DAL  dal  )  [inline]
 

DAL setter.

Parameters:
dal DAL reference.


Member Data Documentation

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.

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.

ChangeListener com::cosylab::cdb::client::CDBAccess::changeListener = null [private]
 

Listener for CDB change.

DAL com::cosylab::cdb::client::CDBAccess::dalReference = null [private]
 

DAL reference.

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).

String com::cosylab::cdb::client::CDBAccess::defaultDAL = null [private]
 

Default DAL CORBA reference (if not authority is specified).

Logger com::cosylab::cdb::client::CDBAccess::logger = null [private]
 

Logger.

ORB com::cosylab::cdb::client::CDBAccess::orb = null [private]
 

CORBA Object Request Broker (ORB) reference.

boolean com::cosylab::cdb::client::CDBAccess::remoteDAO = true [private]
 

Switch to turn remote DAO on.


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:12:17 2009 for ACS Java API by doxygen 1.3.8