Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

gov::cca::Services Class Reference

The handle through which the component communicates with its containing framework. More...

#include <cca.h>

List of all members.

Public Methods

virtual ~Services ()
 obligatory virtual destructor. More...

virtual PortInfocreatePortInfo (CONST char *name, CONST char *type, CONST char **properties)=0
 Creates a PortInfo to be used in subsequent calls to describe a Port. More...

virtual PortgetPort (CONST char *name)=0
 Fetch a port from the framework. More...

virtual void releasePort (CONST char *name)=0
 Free's the port indicated by the instance name for modification by the component's containing framework. More...

virtual int registerUsesPort (PortInfo *name_and_type)=0
 Notifies the framework that a port described by PortInfo may be used by this component. More...

virtual int unregisterUsesPort (CONST char *name)=0
 Notify the framework that a Port, previously registered by this component, is no longer desired. More...

virtual int addProvidesPort (Port *inPort, PortInfo *name)=0
 Exports a Port implemented by this component to the framework. More...

virtual void removeProvidesPort (CONST char *name)=0
 Notifies the framework that a previously exported Port is no longer available for use. More...

virtual CDELETE ComponentIDgetComponentID ()=0
 Get a reference to the component which this Services object belongs. More...

virtual CFREE PortInfo ** getProvidedPorts (int &length)=0
 UNADOPTED: Return the Ports this component currently provides. More...

virtual CFREE PortInfo ** getRegisteredPorts (int &length)=0
 UNADOPTED: Return the Ports this component currently wants. More...


Detailed Description

The handle through which the component communicates with its containing framework.


Constructor & Destructor Documentation

virtual gov::cca::Services::~Services   [inline, virtual]
 

obligatory virtual destructor.

00135 {}


Member Function Documentation

virtual PortInfo* gov::cca::Services::createPortInfo CONST char *    name,
CONST char *    type,
CONST char **    properties
[pure virtual]
 

Creates a PortInfo to be used in subsequent calls to describe a Port.

The arguments given are copied, not kept. properties is an even length list (argv) of key/value pairs terminated by a NULL key. Note that names of Ports in a component are not distinct for used and provided ports. Standard properties: (UNADOPTED, extensible list) gov.cca.port.minConnections (int >= 0; default 0) gov.cca.port.maxConnections (int >= 1, default 1) gov.cca.port.proxyAllowed (true,false; default false)

virtual Port* gov::cca::Services::getPort CONST char *    name [pure virtual]
 

Fetch a port from the framework.

Normally this means a uses port. If no uses port is connected and a provided port of the name requested is available, the component will be handed back that port. Returns NULL if no provided port or uses port connection matches name.

See also:
Services.java; UNADOPTED C++ definition of "an error occurs".

virtual void gov::cca::Services::releasePort CONST char *    name [pure virtual]
 

Free's the port indicated by the instance name for modification by the component's containing framework.

After this call the port will not be valid for use until getPort() is called again.

virtual int gov::cca::Services::registerUsesPort PortInfo   name_and_type [pure virtual]
 

Notifies the framework that a port described by PortInfo may be used by this component.

The portinfo is obtained from createPortInfo. Returns nonzero if there is an error in registering, such as bad PortInfo or already registered.

See also:
Services.java; UNADOPTED C++ definition of "an error occurs".

virtual int gov::cca::Services::unregisterUsesPort CONST char *    name [pure virtual]
 

Notify the framework that a Port, previously registered by this component, is no longer desired.

Returns nonzero if the port is still in use, ignoring the unregister request.

See also:
Services.java; UNADOPTED C++ definition of "an error occurs".

virtual int gov::cca::Services::addProvidesPort Port   inPort,
PortInfo   name
[pure virtual]
 

Exports a Port implemented by this component to the framework.

This Port is now available for the framework to connect to other components. The PortInfo is obtained from createPortInfo. Returns nonzero if addProvidesPort fails, for example, because that name is already provided.

See also:
Services.java; UNADOPTED C++ definition of "an error occurs".

virtual void gov::cca::Services::removeProvidesPort CONST char *    name [pure virtual]
 

Notifies the framework that a previously exported Port is no longer available for use.

virtual CDELETE ComponentID* gov::cca::Services::getComponentID   [pure virtual]
 

Get a reference to the component which this Services object belongs.

virtual CFREE PortInfo** gov::cca::Services::getProvidedPorts int &    length [pure virtual]
 

UNADOPTED: Return the Ports this component currently provides.

Length of the PortInfo array returned is an output argument.

virtual CFREE PortInfo** gov::cca::Services::getRegisteredPorts int &    length [pure virtual]
 

UNADOPTED: Return the Ports this component currently wants.

Length of the PortInfo array returned is an output argument.


The documentation for this class was generated from the following file:
Generated on Tue Aug 20 14:30:31 2002 for CCA Specification/Proposals by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002