|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=CLASS) @Target(value=METHOD) public @interface Destroy
Annotates a method which is invoked when the component is destroyed. The method is called when the component's bundle is stopped, or when one of its required dependency is lost (unless the dependency has been defined as an "instance bound" dependency using the Dependency Manager API).
@Component class MyComponent { @ServiceDependency private LogService logService; // Required dependency over the log service. @Destroy void destroyed() {} // called if bundle is stopped or if we have lost some required dependencies. }
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |