Interface IServicesOrchestrator


  • public interface IServicesOrchestrator
    The services orchestrator.

    It provides synchronized, ordered and solid way to manipulate the life cycle of the services.

    All the methods are thread-safe.

    Since:
    1.0.0
    See Also:
    LifecyclePhase, LifecycleService, LifecycleParticipant
    • Method Detail

      • startServices

        void startServices​(ILifecycleContext context,
                           org.eclipse.core.runtime.IProgressMonitor progressMonitor)
        Starts the lifecycle services in accordance with lifecycle phases order and participants dependencies.
        For more information about phases, see LifecyclePhase.

        If the specified context is already started it does nothing.

        Parameters:
        context - the context the services are being start with, cannot be null.
        progressMonitor - the progress monitor, can be null.
        Since:
        3.0.0
      • stopServices

        void stopServices​(ILifecycleContext context,
                          org.eclipse.core.runtime.IProgressMonitor progressMonitor)
        Stops the lifecycle services in accordance with lifecycle phases order and participants dependencies.
        For more information about phases, see LifecyclePhase.

        If the specified context is already stopped it does nothing.

        Parameters:
        context - the context the services are being stopped with, cannot be null.
        progressMonitor - the progress monitor, can be null.
        Since:
        3.0.0
      • removeListener

        void removeListener​(IServiceContextLifecycleListener listener)
        Removes a previously registered listener. In order to support removal, the listener implementation should implement Object#equals(Object) and Object#hashCode() to compare listener instances.
        Parameters:
        listener - the listener to remove, cannot be null.
      • isInfrastructureReady

        boolean isInfrastructureReady()
        Checks if is infrastructure ready. In other words, checks if linking phase is performed.
        Returns:
        true if the infrastructure is ready, false - otherwise.
        Since:
        3.0.0