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

abeans::pluggable::acs::cdb::dal::CDBDALPlug Class Reference

Collaboration diagram for abeans::pluggable::acs::cdb::dal::CDBDALPlug:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CDBDALPlug ()
String getSupportedLibrary ()
void internalConnect (Connectable c) throws RemoteException
void internalDisconnect (Connectable c) throws RemoteException
RemoteInfo createRemoteInfo (String authority, String abeanName)
ComponentDescriptor getComponentDescriptor ()
void initialize (ComponentManager manager, Object state, ComponentDescriptor cdesc) throws IllegalComponentStateException, ComponentInitializationException
String[][] getConfigurationDescriptions ()
String getConfigurationName ()
void setConfiguration (AbeansProperties props) throws InitializationException

Static Public Attributes

final String PLUG_NAME = "CDBDAL"

Protected Member Functions

void resumeInternal ()
void suspendInternal ()

Private Member Functions

void internalDatabaseConnect (Connectable c) throws RemoteException
void internalDatabaseDisconnect (Connectable c) throws RemoteException

Private Attributes

boolean remoteDAO = true
String defaultDAL = null
DatabaseProxyImpl db = null
Map dalCache = new NameValueList()
ORB orb = null
ChangeListener changeListener = null
final transient ComponentDescriptor descriptor

Static Private Attributes

final String CDBDAL_RESOURCE_LOC = PLUG_NAME+"Plug"
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

Implementation of the abeans.pluggable.Plug that starts up and shuts down the CDBDAL database and take care for configuration and policy management. The plug is managed automatically by the Abeans framework.

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


Constructor & Destructor Documentation

abeans::pluggable::acs::cdb::dal::CDBDALPlug::CDBDALPlug  )  [inline]
 

Creates a new instance of the plug. This constructor is automatically invoked by the Abeans framework.


Member Function Documentation

RemoteInfo abeans::pluggable::acs::cdb::dal::CDBDALPlug::createRemoteInfo String  authority,
String  abeanName
[inline]
 

Creates the remote info by calculating the plug prefix (scheme) and the global namespace if present.

Parameters:
authority the naming authority that will be used when resolving the remote info, can be null, in which case the plug will provide default authority
abeanName the nameof the abean, non-null; this is the name stripped of the plug prefix and the namespace
Returns:
a new remote info instance
See also:
abeans.core.Plug#createRemoteInfo(String)

ComponentDescriptor abeans::pluggable::acs::cdb::dal::CDBDALPlug::getComponentDescriptor  )  [inline]
 

Returns the component descriptor for this class.

Returns:
the component descriptor for this
See also:
abeans.core.Component#getComponentDescriptor()

String [][] abeans::pluggable::acs::cdb::dal::CDBDALPlug::getConfigurationDescriptions  )  [inline]
 

Returns the descriptors for this plug.

Returns:
an array of configuration descriptions
See also:
abeans.core.defaults.Configurable#getConfigurationDescriptions()

String abeans::pluggable::acs::cdb::dal::CDBDALPlug::getConfigurationName  )  [inline]
 

Returns name of the plug, the configuration name of this plug.

Returns:
configuration name
See also:
abeans.core.defaults.Configurable#getConfigurationName()

String abeans::pluggable::acs::cdb::dal::CDBDALPlug::getSupportedLibrary  )  [inline]
 

Returns Channel to indicate that this plug uses Channel model.

Returns:
Channel
See also:
abeans.pluggable.Plug#getSupportedLibrary()

void abeans::pluggable::acs::cdb::dal::CDBDALPlug::initialize ComponentManager  manager,
Object  state,
ComponentDescriptor  cdesc
throws IllegalComponentStateException, ComponentInitializationException [inline]
 

Initializes this plug by creating a new instance of the database proxy implementation.

Parameters:
manager manager that will contain this plug (plug layer), non-null
state null
cdesc null
Exceptions:
IllegalComponentStateException not thrown explicitly by this method
ComponentInitializationException if the state transfer is attempted
See also:
abeans.core.Component#initialize(ComponentManager, Object, ComponentDescriptor)

void abeans::pluggable::acs::cdb::dal::CDBDALPlug::internalConnect Connectable  c  )  throws RemoteException [inline]
 

Performs the connect of the specified connectable. If the database engine from abeans.engine is supplied as connectable, an instance of DatabaseProxyImpl is returned. Otherwise the connectable entity is resolved from the remote info supplied with connectable c and is returned as proxy into the Abean.

Parameters:
c the connectable to connect, non-null
Exceptions:
RemoteException if the connection fails
See also:
abeans.pluggable.Plug#internalConnect(Connectable)

void abeans::pluggable::acs::cdb::dal::CDBDALPlug::internalDatabaseConnect Connectable  c  )  throws RemoteException [inline, private]
 

Performs the connect of the specified database connectable.

Parameters:
c the database connectable to connect, non-null
Exceptions:
RemoteException if the connection fails
See also:
abeans.pluggable.Plug#internalConnect(Connectable)

void abeans::pluggable::acs::cdb::dal::CDBDALPlug::internalDatabaseDisconnect Connectable  c  )  throws RemoteException [inline, private]
 

Sets the proxy of the database connectable to null

Parameters:
c the connectable to disconnect, non-null
Exceptions:
RemoteException never thrown explicitly by this method
See also:
abeans.pluggable.Plug#internalDisconnect(Connectable)

void abeans::pluggable::acs::cdb::dal::CDBDALPlug::internalDisconnect Connectable  c  )  throws RemoteException [inline]
 

Sets the proxy of the connectable to null

Parameters:
c the connectable to disconnect, non-null
Exceptions:
RemoteException never thrown explicitly by this method
See also:
abeans.pluggable.Plug#internalDisconnect(Connectable)

void abeans::pluggable::acs::cdb::dal::CDBDALPlug::resumeInternal  )  [inline, protected]
 

Delegates to the database proxy implementation. Install CORBA Service (DefaultCORBAService).

See also:
abeans.pluggable.Plug#resumeInternal()

void abeans::pluggable::acs::cdb::dal::CDBDALPlug::setConfiguration AbeansProperties  props  )  throws InitializationException [inline]
 

Interprets the configuration delivered by Abeans configuration service.

Parameters:
prop the configuration, if null, the method returns NOP
Exceptions:
InitializationException when the configuration cannot be interpreted
See also:
abeans.core.defaults.Configurable#setConfiguration(AbeansProperties)

void abeans::pluggable::acs::cdb::dal::CDBDALPlug::suspendInternal  )  [inline, protected]
 

Delegates to the database proxy implementation.

See also:
abeans.pluggable.Plug#suspendInternal()


Member Data Documentation

final String abeans::pluggable::acs::cdb::dal::CDBDALPlug::CDBDAL_DEFAULT_REFERENCE = CDBDAL_PREFIX + ".defaultReference" [static, private]
 

The constant denoting the name of default DAL reference property key.

final String abeans::pluggable::acs::cdb::dal::CDBDALPlug::CDBDAL_PREFIX = "DAL" [static, private]
 

The constant denoting the prefix of the DAL configuration keys.

final String abeans::pluggable::acs::cdb::dal::CDBDALPlug::CDBDAL_RESOURCE_LOC = PLUG_NAME+"Plug" [static, private]
 

The constant denoting the name of the configuration resource (file).

final String abeans::pluggable::acs::cdb::dal::CDBDALPlug::CDBDAO_PREFIX = "DAO" [static, private]
 

The constant denoting the prefix of the DAO configuration keys.

final String abeans::pluggable::acs::cdb::dal::CDBDALPlug::CDBDAO_REMOTE = CDBDAO_PREFIX + ".remote" [static, private]
 

The constant denoting the name of default DAO remote switch property key.

ChangeListener abeans::pluggable::acs::cdb::dal::CDBDALPlug::changeListener = null [private]
 

Listener for CDB change.

Map abeans::pluggable::acs::cdb::dal::CDBDALPlug::dalCache = new NameValueList() [private]
 

CORBA del reference cache.

DatabaseProxyImpl abeans::pluggable::acs::cdb::dal::CDBDALPlug::db = null [private]
 

Reference to the database proxy implementation.

final String abeans::pluggable::acs::cdb::dal::CDBDALPlug::DEFAULT_REFERENCE = "corbaloc::" + ACSPorts.getIP() + ":" + ACSPorts.getCDBPort() + "/CDB" [static, private]
 

The constant denoting the default DAL reference (if non is set).

String abeans::pluggable::acs::cdb::dal::CDBDALPlug::defaultDAL = null [private]
 

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

final transient ComponentDescriptor abeans::pluggable::acs::cdb::dal::CDBDALPlug::descriptor [private]
 

Initial value:

new ComponentDescriptor(getClass(), Plug.class, 1, "CDBDAL plug for Channel model", false, false, null)
Component description of this plug.

ORB abeans::pluggable::acs::cdb::dal::CDBDALPlug::orb = null [private]
 

CORBA Object Request Broker (ORB) reference.

final String abeans::pluggable::acs::cdb::dal::CDBDALPlug::PLUG_NAME = "CDBDAL" [static]
 

The constant denoting the name of this plug.

boolean abeans::pluggable::acs::cdb::dal::CDBDALPlug::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 02:43:18 2009 for ACS Java API by doxygen 1.3.8