Public Member Functions | |
cca.ComponentID | createInstance (in string instanceName, in string className, in cca.TypeMap properties) throws cca.CCAException |
Creates an instance of a CCA component of the type defined by the string className. | |
array< cca.ComponentID > | getComponentIDs () throws cca.CCAException |
Get component list. | |
cca.TypeMap | getComponentProperties (in cca.ComponentID cid) throws cca.CCAException |
Get property map for component. | |
void | setComponentProperties (in cca.ComponentID cid, in cca.TypeMap map) throws cca.CCAException |
Causes the framework implementation to associate the given properties with the component designated by cid. | |
cca.ComponentID | getDeserialization (in string s) throws cca.CCAException |
Get component id from stringified reference. | |
cca.ComponentID | getComponentID (in string componentInstanceName) throws cca.CCAException |
Get id from name by which it was created. | |
void | destroyInstance (in cca.ComponentID toDie, in float timeout) throws cca.CCAException |
Eliminate the Component instance, from the scope of the framework. | |
array< string > | getProvidedPortNames (in cca.ComponentID cid) throws cca.CCAException |
Get the names of Port instances provided by the identified component. | |
array< string > | getUsedPortNames (in cca.ComponentID cid) throws cca.CCAException |
Get the names of Port instances used by the identified component. | |
cca.TypeMap | getPortProperties (in cca.ComponentID cid, in string portName) throws cca.CCAException |
Fetch map of Port properties exposed by the framework. | |
void | setPortProperties (in cca.ComponentID cid, in string portName, in cca.TypeMap map) throws cca.CCAException |
Associates the properties given in map with the Port indicated by portname. | |
cca.ConnectionID | connect (in cca.ComponentID user, in string usingPortName, in cca.ComponentID provider, in string providingPortName) throws cca.CCAException |
Creates a connection between ports on component user and component provider. | |
array< cca.ConnectionID > | getConnectionIDs (in array< cca.ComponentID > componentList) throws cca.CCAException |
Returns a list of connections as an array of handles. | |
cca.TypeMap | getConnectionProperties (in cca.ConnectionID connID) throws cca.CCAException |
Fetch property map of a connection. | |
void | setConnectionProperties (in cca.ConnectionID connID, in cca.TypeMap map) throws cca.CCAException |
Associates the properties with the connection. | |
void | disconnect (in cca.ConnectionID connID, in float timeout) throws cca.CCAException |
Disconnect the connection indicated by connID before the indicated timeout in secs. | |
void | disconnectAll (in cca.ComponentID id1, in cca.ComponentID id2, in float timeout) throws cca.CCAException |
Remove all connections between components id1 and id2 within the period of timeout secs. |
It is meant to expose the Component creation and composition functionality without the specific framework implementation. This interface is expected to be useful for rapid application development in a scripting language. Other uses are generic application development environments for CCA applications.
Each of the fundamental component architecture pieces (instances of Component, Port, and Connection) may have an associated TypeMap of properties managed by the framework. The standardized keys in the properties of a Port are documented in Services.getPortProperties(). The standardized keys in the properties of a Component and Connection are documented below.
For connection, thus far:
Key value meaning cca.isInUse boolean true if there have been more successful getPort than releasePort calls for the connection at the the time properties were fetched.
For component, thus far:
Key value meaning cca.className string component type
cca.ConnectionID gov.cca.ports.BuilderService.connect | ( | in cca.ComponentID | user, | |
in string | usingPortName, | |||
in cca.ComponentID | provider, | |||
in string | providingPortName | |||
) | throws cca.CCAException |
Creates a connection between ports on component user and component provider.
Destroying the ConnectionID does not cause a disconnection; for that, see disconnect().
CCAException | when any one of the following conditions occur:
|
cca.ComponentID gov.cca.ports.BuilderService.createInstance | ( | in string | instanceName, | |
in string | className, | |||
in cca.TypeMap | properties | |||
) | throws cca.CCAException |
Creates an instance of a CCA component of the type defined by the string className.
The string classname uniquely defines the "type" of the component, e.g. doe.cca.Library.GaussianElmination. It has an instance name given by the string instanceName. The instanceName may be empty (zero length) in which case the instanceName will be assigned to the component automatically.
CCAException | If the Component className is unknown, or if the instanceName has already been used, a CCAException is thrown. |
void gov.cca.ports.BuilderService.destroyInstance | ( | in cca.ComponentID | toDie, | |
in float | timeout | |||
) | throws cca.CCAException |
Eliminate the Component instance, from the scope of the framework.
toDie | the component to be removed. | |
timeout | the allowable wait; 0 means up to the framework. |
CCAException | if toDie refers to an invalid component, or if the operation takes longer than timeout seconds. |
void gov.cca.ports.BuilderService.disconnect | ( | in cca.ConnectionID | connID, | |
in float | timeout | |||
) | throws cca.CCAException |
Disconnect the connection indicated by connID before the indicated timeout in secs.
Upon successful completion, connID and the connection it represents become invalid.
timeout | the time in seconds to wait for a connection to close; 0 means to use the framework implementation default. | |
connID | the connection to be broken. |
CCAException | when any one of the following conditions occur:
|
void gov.cca.ports.BuilderService.disconnectAll | ( | in cca.ComponentID | id1, | |
in cca.ComponentID | id2, | |||
in float | timeout | |||
) | throws cca.CCAException |
Remove all connections between components id1 and id2 within the period of timeout secs.
If id2 is null, then all connections to id1 are removed (within the period of timeout secs).
CCAException | when any one of the following conditions occur:
|
cca.ComponentID gov.cca.ports.BuilderService.getComponentID | ( | in string | componentInstanceName | ) | throws cca.CCAException |
Get id from name by which it was created.
CCAException | if there is no component matching the given componentInstanceName. |
array< cca.ComponentID > gov.cca.ports.BuilderService.getComponentIDs | ( | ) | throws cca.CCAException |
cca.TypeMap gov.cca.ports.BuilderService.getComponentProperties | ( | in cca.ComponentID | cid | ) | throws cca.CCAException |
Get property map for component.
a | CCAException if the ComponentID is invalid. |
array< cca.ConnectionID > gov.cca.ports.BuilderService.getConnectionIDs | ( | in array< cca.ComponentID > | componentList | ) | throws cca.CCAException |
Returns a list of connections as an array of handles.
This will return all connections involving components in the given componentList of ComponentIDs. This means that ConnectionID's will be returned even if only one of the participants in the connection appears in componentList.
CCAException | if any component in componentList is invalid. |
cca.TypeMap gov.cca.ports.BuilderService.getConnectionProperties | ( | in cca.ConnectionID | connID | ) | throws cca.CCAException |
Fetch property map of a connection.
CCAException | if connID is invalid. |
cca.ComponentID gov.cca.ports.BuilderService.getDeserialization | ( | in string | s | ) | throws cca.CCAException |
Get component id from stringified reference.
CCAException | if the string does not represent the appropriate serialization of a ComponentID for the underlying framework. |
cca.TypeMap gov.cca.ports.BuilderService.getPortProperties | ( | in cca.ComponentID | cid, | |
in string | portName | |||
) | throws cca.CCAException |
Fetch map of Port properties exposed by the framework.
CCAException | when any one of the following conditions occur:
|
array< string > gov.cca.ports.BuilderService.getProvidedPortNames | ( | in cca.ComponentID | cid | ) | throws cca.CCAException |
Get the names of Port instances provided by the identified component.
cid | the component. |
CCAException | if cid refers to an invalid component. |
array< string > gov.cca.ports.BuilderService.getUsedPortNames | ( | in cca.ComponentID | cid | ) | throws cca.CCAException |
Get the names of Port instances used by the identified component.
cid | the component. |
CCAException | if cid refers to an invalid component. |
void gov.cca.ports.BuilderService.setComponentProperties | ( | in cca.ComponentID | cid, | |
in cca.TypeMap | map | |||
) | throws cca.CCAException |
Causes the framework implementation to associate the given properties with the component designated by cid.
CCAException | if cid is invalid or if there is an attempted change to a property locked by the framework implementation. |
void gov.cca.ports.BuilderService.setConnectionProperties | ( | in cca.ConnectionID | connID, | |
in cca.TypeMap | map | |||
) | throws cca.CCAException |
Associates the properties with the connection.
map | the source of the properties. | |
connID | connection to receive property values. |
CCAException | if connID is invalid, or if this changes a property locked by the underlying framework. |
void gov.cca.ports.BuilderService.setPortProperties | ( | in cca.ComponentID | cid, | |
in string | portName, | |||
in cca.TypeMap | map | |||
) | throws cca.CCAException |
Associates the properties given in map with the Port indicated by portname.
The component must have a Port known by portname.
CCAException | if either cid or portname are invalid, or if this a changed property is locked by the underlying framework or component. |