Annotation Type LifecycleService


  • @Documented
    @Target(TYPE)
    @Retention(RUNTIME)
    @Inherited
    public @interface LifecycleService
    Annotates the classes to mark it as lifecycle services.

    To register the service as a lifecycle service 2 conditions are required:

    • The service class should be marked with the LifecycleService annotation
    • The service instance should be registered and available via BundleContext

    The annotation has only required attribute 'name'. This attribute must be unique. The lifecycle service should have one or more lifecycle participants.

    Example:

          @LifecycleService(name = "MyParticipant")
          public class MyService
          {
              @LifecycleParticipant(phase = LifecyclePhase.LINKING)
              public void doSmth()
              {
                  // ...
              }
          }
      

    Since:
    3.0.0
    See Also:
    LifecycleParticipant
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String name
      The name of the lifecycle service.
    • Element Detail

      • name

        String name
        The name of the lifecycle service.
        Returns:
        the name of the lifecycle service, never null or empty.