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

abeans::pluggable::acs::maci::ACSPlug Class Reference

Collaboration diagram for abeans::pluggable::acs::maci::ACSPlug:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACSPlug ()
String getSupportedLibrary ()
void internalConnect (Connectable c) throws RemoteException
void updateRemoteDirectory ()
synchronized void managerConnect (String managerReference)
synchronized void managerDisconnect ()
boolean isConnected ()
void internalDisconnect (Connectable c) throws RemoteException
RemoteInfo createRemoteInfo (String authority, String abeanName)
ComponentDescriptor getComponentDescriptor ()
void initialize (ComponentManager manager, java.lang.Object state, ComponentDescriptor cdesc) throws IllegalComponentStateException, ComponentInitializationException
String[][] getConfigurationDescriptions ()
String getConfigurationName ()
void setConfiguration (AbeansProperties props) throws InitializationException
void destroy ()
String getDefaultManagerReference ()
void setDefaultManagerReference (String reference)

Static Public Member Functions

String IDtoClassName (String id, boolean proxyClass)

Static Public Attributes

final String PLUG_NAME = "ACS"

Protected Member Functions

void resumeInternal ()
void suspendInternal ()

Package Attributes

Map unavailableConnectables = new HashMap()

Private Member Functions

ManagerClientInfoEntry connectToManager (String corbaloc) throws RemoteException
void updateRemoteDirectory (String corbaloc, ManagerClientInfoEntry mcie)
void updateRemoteDirectoryLinkable (String connectableName, Connectable c)
synchronized void initialManagerConnect ()
void internalDatabaseConnect (Connectable c) throws RemoteException
void releaseConnectable (Connectable c, String curl, boolean ignoreUnavailabeFlag) throws RemoteException
void internalDatabaseDisconnect (Connectable c) throws RemoteException
void managerDisconnect (String corbaloc)
Proxy instatiateComponentProxy (String curl, org.omg.CORBA.Object component, String compomentProxyClassName) throws AssertionFailed

Private Attributes

String defaultManagerReference = null
boolean initialManagerConnectDone = false
DatabaseProxyImpl db = null
Map managerCache = new NameValueList()
ORB orb = null
Map componentProxyReferenceCountMap = new HashMap()
AbeansProperties plugConfig = null
RemoteDirectory directory = null
final transient ComponentDescriptor descriptor

Static Private Attributes

final String ACS_RESOURCE_LOC = PLUG_NAME+"Plug"
final String MANAGER_PREFIX = "Manager"
final String DEFAULT_MANAGER_REFERENCE = MANAGER_PREFIX + ".defaultReference"
final String DEFAULT_REFERENCE = "corbaloc::" + ACSPorts.getIP() + ":" + ACSPorts.getManagerPort() + "/Manager"

Detailed Description

Implementation of the abeans.pluggable.Plug that starts up and shuts down the ACS 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::maci::ACSPlug::ACSPlug  )  [inline]
 

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


Member Function Documentation

ManagerClientInfoEntry abeans::pluggable::acs::maci::ACSPlug::connectToManager String  corbaloc  )  throws RemoteException [inline, private]
 

Connect to the Manager.

Parameters:
corbaloc manager CORBA reference.
Returns:
manager and client info entry.
Exceptions:
RemoteException thrown if failed to connect.

RemoteInfo abeans::pluggable::acs::maci::ACSPlug::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)

void abeans::pluggable::acs::maci::ACSPlug::destroy  )  [inline]
 

See also:
abeans.core.Node#destroy()

ComponentDescriptor abeans::pluggable::acs::maci::ACSPlug::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::maci::ACSPlug::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::maci::ACSPlug::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::maci::ACSPlug::getDefaultManagerReference  )  [inline]
 

Return default Manager reference.

Returns:
default Manager reference.

String abeans::pluggable::acs::maci::ACSPlug::getSupportedLibrary  )  [inline]
 

Returns BACI to indicate that this plug uses BACI model.

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

String abeans::pluggable::acs::maci::ACSPlug::IDtoClassName String  id,
boolean  proxyClass
[inline, static]
 

Converts CORBA ID to Abeans R3 model proxy class name. Example: IDL:cosylab.com/ACS/PowerSupply:1.0 -> com.cosylab.ACS.abeans.proxy.PowerSupplyProxy

Parameters:
id CORBA ID to be converted to proxy class name.
proxyClass set to true, if you want to get proxy class name
Returns:
Abeans R3 model proxy class name.

void abeans::pluggable::acs::maci::ACSPlug::initialize ComponentManager  manager,
java.lang.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)

synchronized void abeans::pluggable::acs::maci::ACSPlug::initialManagerConnect  )  [inline, private]
 

Connect to the default manager.

Todo:
GCH 2006-10-09 Here we should catch the specific exceptions of get_service and print trace logs of ACS exceptions.

Proxy abeans::pluggable::acs::maci::ACSPlug::instatiateComponentProxy String  curl,
org.omg.CORBA.Object  component,
String  compomentProxyClassName
throws AssertionFailed [inline, private]
 

Instatiates a component proxy of given class name.

Parameters:
c connectable instance.
curl curl of c.
component component for which proxy is being created.
compomentProxyClassName name of the component proxy class.
Returns:
requested proxy instance.
Exceptions:
AssertionFailed 

void abeans::pluggable::acs::maci::ACSPlug::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)

Todo:
GCH 2006-10-09 Here we do not do a mapping of the received error trace but we simply log a new RemoteException. This code should be improved.

void abeans::pluggable::acs::maci::ACSPlug::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::maci::ACSPlug::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::maci::ACSPlug::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)

boolean abeans::pluggable::acs::maci::ACSPlug::isConnected  )  [inline]
 

Return connection status, i.e. is connected to the default manager.

Returns:
connection status, i.e. is connected to the default manager.

synchronized void abeans::pluggable::acs::maci::ACSPlug::managerConnect String  managerReference  )  [inline]
 

Reconnect to the default manager.

void abeans::pluggable::acs::maci::ACSPlug::managerDisconnect String  corbaloc  )  [inline, private]
 

Disconnect the manager.

Parameters:
corbaloc reference of the manager to be disconnected.

synchronized void abeans::pluggable::acs::maci::ACSPlug::managerDisconnect  )  [inline]
 

Disconnect from to the default manager.

void abeans::pluggable::acs::maci::ACSPlug::releaseConnectable Connectable  c,
String  curl,
boolean  ignoreUnavailabeFlag
throws RemoteException [inline, private]
 

Releases Connectable (decrements its reference count and if necessary calls release_component on Manager).

Parameters:
c 
curl 
Exceptions:
RemoteException 

void abeans::pluggable::acs::maci::ACSPlug::resumeInternal  )  [inline, protected]
 

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

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

void abeans::pluggable::acs::maci::ACSPlug::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::maci::ACSPlug::setDefaultManagerReference String  reference  )  [inline]
 

Set default Manager reference.

Parameters:
reference new default Manager reference.

void abeans::pluggable::acs::maci::ACSPlug::suspendInternal  )  [inline, protected]
 

Delegates to the database proxy implementation.

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

void abeans::pluggable::acs::maci::ACSPlug::updateRemoteDirectory String  corbaloc,
ManagerClientInfoEntry  mcie
[inline, private]
 

Queries manager for all components and updates remote directory.

Parameters:
corbaloc manager CORBA reference.
mcie manager remote info.

void abeans::pluggable::acs::maci::ACSPlug::updateRemoteDirectory  )  [inline]
 

Queries the default manager and updates remote directory.

void abeans::pluggable::acs::maci::ACSPlug::updateRemoteDirectoryLinkable String  connectableName,
Connectable  c
[inline, private]
 

Updates remote directory for Linkable instances of Connectable instance.

Parameters:
connectableName name of connectable instance.
c connectable instance to be updated.


Member Data Documentation

final String abeans::pluggable::acs::maci::ACSPlug::ACS_RESOURCE_LOC = PLUG_NAME+"Plug" [static, private]
 

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

Map abeans::pluggable::acs::maci::ACSPlug::componentProxyReferenceCountMap = new HashMap() [private]
 

Component reference count map.

DatabaseProxyImpl abeans::pluggable::acs::maci::ACSPlug::db = null [private]
 

Reference to the database proxy implementation.

final String abeans::pluggable::acs::maci::ACSPlug::DEFAULT_MANAGER_REFERENCE = MANAGER_PREFIX + ".defaultReference" [static, private]
 

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

final String abeans::pluggable::acs::maci::ACSPlug::DEFAULT_REFERENCE = "corbaloc::" + ACSPorts.getIP() + ":" + ACSPorts.getManagerPort() + "/Manager" [static, private]
 

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

String abeans::pluggable::acs::maci::ACSPlug::defaultManagerReference = null [private]
 

Manager CORBA reference (if not authority is specified).

final transient ComponentDescriptor abeans::pluggable::acs::maci::ACSPlug::descriptor [private]
 

Initial value:

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

RemoteDirectory abeans::pluggable::acs::maci::ACSPlug::directory = null [private]
 

ACS remote directory.

boolean abeans::pluggable::acs::maci::ACSPlug::initialManagerConnectDone = false [private]
 

Flag indicating if initial manager connection was done (has to be tried only once).

final String abeans::pluggable::acs::maci::ACSPlug::MANAGER_PREFIX = "Manager" [static, private]
 

The constant denoting the prefix of the MANAGER configuration keys.

Map abeans::pluggable::acs::maci::ACSPlug::managerCache = new NameValueList() [private]
 

CORBA del reference cache.

ORB abeans::pluggable::acs::maci::ACSPlug::orb = null [private]
 

CORBA Object Request Broker (ORB) reference.

final String abeans::pluggable::acs::maci::ACSPlug::PLUG_NAME = "ACS" [static]
 

The constant denoting the name of this plug.

AbeansProperties abeans::pluggable::acs::maci::ACSPlug::plugConfig = null [private]
 

Properties of the plug.

Map abeans::pluggable::acs::maci::ACSPlug::unavailableConnectables = new HashMap() [package]
 


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