All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sitewhere.spi.microservice.lifecycle.ICompositeLifecycleStep Maven / Gradle / Ivy

There is a newer version: 3.0.13
Show newest version
/*
 * Copyright (c) SiteWhere, LLC. All rights reserved. http://www.sitewhere.com
 *
 * The software in this package is published under the terms of the CPAL v1.0
 * license, a copy of which has been included with this distribution in the
 * LICENSE.txt file.
 */
package com.sitewhere.spi.microservice.lifecycle;

import java.util.List;

/**
 * Implementation of {@link ILifecycleStep} that executes multiple steps in
 * sequence.
 */
public interface ICompositeLifecycleStep extends ILifecycleStep {

    /**
     * Add a step to the list.
     * 
     * @param step
     */
    void addStep(ILifecycleStep step);

    /**
     * Add step that initializes a component.
     * 
     * @param owner
     * @param component
     * @param require
     */
    void addInitializeStep(ILifecycleComponent owner, ILifecycleComponent component, boolean require);

    /**
     * Add step that starts a component.
     * 
     * @param owner
     * @param component
     * @param require
     */
    void addStartStep(ILifecycleComponent owner, ILifecycleComponent component, boolean require);

    /**
     * Add step that stops a component.
     * 
     * @param owner
     * @param component
     */
    void addStopStep(ILifecycleComponent owner, ILifecycleComponent component);

    /**
     * Add step that terminates a component.
     * 
     * @param owner
     * @param component
     */
    void addTerminateStep(ILifecycleComponent owner, ILifecycleComponent component);

    /**
     * Get an ordered list of steps to be executed.
     * 
     * @return
     */
    List getSteps();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy