cca-spec-babel
0.8.6-unstable(developer)
|
An interface so the framework can inform the component when the component is about to be destroyed. More...
Public Member Functions | |
void | releaseServices (in Services services) throws CCAException |
Shuts down a component presence in the calling framework. |
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.
void gov.cca.ComponentRelease.releaseServices | ( | in Services | services | ) | throws CCAException |
Shuts down a component presence in the calling framework.
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.