Annotation Type Activate


  • @Retention(CLASS)
    @Target({METHOD,FIELD,CONSTRUCTOR})
    public @interface Activate
    Identify the annotated member as part of the activation of a Service Component.

    When this annotation is applied to a:

    • Method - The method is the activate method of the Component.
    • Constructor - The constructor will be used to construct the Component and can be called with activation objects and bound services as parameters.
    • Field - The field will contain an activation object of the Component. The field must be set after the constructor is called and before calling any other method on the fully constructed component instance. That is, there is a happens-before relationship between the field being set and calling any method on the fully constructed component instance such as the activate method.

    This annotation is not processed at runtime by Service Component Runtime. It must be processed by tools and used to add a Component Description to the bundle.

    Since:
    1.1
    See Also:
    "The init, activate, and activation-fields attributes of the component element of a Component Description."