gov.cca.ports.BuilderService Interface Reference

BuilderService is a Port implemented by a CCA compliant framework for the purpose of composing components into applications in a standard way. More...

Inheritance diagram for gov.cca.ports.BuilderService:

Inheritance graph
[legend]
Collaboration diagram for gov.cca.ports.BuilderService:

Collaboration graph
[legend]

List of all members.

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.


Detailed Description

BuilderService is a Port implemented by a CCA compliant framework for the purpose of composing components into applications in a standard way.

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
   

Member Function Documentation

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

Exceptions:
CCAException when any one of the following conditions occur:
  • If either user or provider refer to an invalid component,
  • If either usingPortName or providingPortName refer to a nonexistent Port on their respective component,
  • If other-- In reality there are a lot of things that can go wrong with this operation, especially if the underlying connections involve networking.

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.

Exceptions:
CCAException If the Component className is unknown, or if the instanceName has already been used, a CCAException is thrown.
Returns:
A ComponentID corresponding to the created component. Destroying the returned ID does not destroy the component; see destroyInstance instead.

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.

Parameters:
toDie the component to be removed.
timeout the allowable wait; 0 means up to the framework.
Exceptions:
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.

Parameters:
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.
Exceptions:
CCAException when any one of the following conditions occur:
  • id refers to an invalid ConnectionID,
  • timeout is exceeded, after which, if id was valid before disconnect() was invoked, it remains valid

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

Exceptions:
CCAException when any one of the following conditions occur:
  • id1 or id2 refer to an invalid ComponentID (other than id2 == null),
  • The timeout period is exceeded before the disconnections can be made.

cca.ComponentID gov.cca.ports.BuilderService.getComponentID ( in string  componentInstanceName  )  throws cca.CCAException

Get id from name by which it was created.

Returns:
a ComponentID from the instance name of the component produced by ComponentID.getInstanceName().
Exceptions:
CCAException if there is no component matching the given componentInstanceName.

array< cca.ComponentID > gov.cca.ports.BuilderService.getComponentIDs (  )  throws cca.CCAException

Get component list.

Returns:
a ComponentID for each component currently created.

cca.TypeMap gov.cca.ports.BuilderService.getComponentProperties ( in cca.ComponentID  cid  )  throws cca.CCAException

Get property map for component.

Returns:
the public properties associated with the component referred to by ComponentID.
Exceptions:
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.

Exceptions:
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.

Returns:
the properties for the given connection.
Exceptions:
CCAException if connID is invalid.

cca.ComponentID gov.cca.ports.BuilderService.getDeserialization ( in string  s  )  throws cca.CCAException

Get component id from stringified reference.

Returns:
a ComponentID from the string produced by ComponentID.getSerialization().
Exceptions:
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.

Returns:
the public properties pertaining to the Port instance portname on the component referred to by cid.
Exceptions:
CCAException when any one of the following conditions occur:
  • portname is not a registered Port on the component indicated by cid,
  • cid refers to an invalid component.

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.

Parameters:
cid the component.
Exceptions:
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.

Parameters:
cid the component.
Exceptions:
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.

Exceptions:
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.

Parameters:
map the source of the properties.
connID connection to receive property values.
Exceptions:
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.

Exceptions:
CCAException if either cid or portname are invalid, or if this a changed property is locked by the underlying framework or component.


The documentation for this interface was generated from the following file:

Generated on Mon Sep 14 18:29:47 2009 for cca-spec-babel by  doxygen 1.5.9