Annotation Type LifecycleService

  • @Documented
    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.


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

    See Also:
    • 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.
        the name of the lifecycle service, never null or empty.