gov.cca.ComponentRelease Interface Reference

An interface so the framework can inform the component when the component is about to be destroyed. More...

List of all members.

Public Member Functions

void releaseServices (in Services services) throws CCAException
 Shuts down a component presence in the calling framework.


Detailed Description

An interface so the framework can inform the component when the component is about to be destroyed.

Components managing memory, files, or other global resources should usually implement this interface and register it via Services.registerForRelease.


Member Function Documentation

void gov.cca.ComponentRelease.releaseServices ( in Services  services  )  throws CCAException

Shuts down a component presence in the calling framework.

Parameters:
services the component instance's handle on the framework world. Contracts concerning services and setServices:
This function is called exactly once for each callback registered through Services.

The argument services will never be nil/null. The argument services will always be the same as that received in setServices.

During this call the component should release any interfaces acquired by getPort().

During this call the component should reset to nil any stored reference to services.

After this call, the component instance will be removed from the framework. If the component instance was created by the framework, it will be destroyed, not recycled, The behavior of any port references obtained from this component instance and stored elsewhere becomes undefined.

Notes for the component implementor: 1) The component writer may perform blocking activities within releaseServices, such as waiting for remote computations to shutdown. 2) It is good practice during releaseServices for the component writer to remove or unregister all the ports it defined.


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