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

org.arquillian.spacelift.task.TaskFactory Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package org.arquillian.spacelift.task;

import java.util.Collection;
import org.arquillian.spacelift.Spacelift;

/**
 * A factory that is able to create tasks instances
 *
 * @param 
 *     Input of the task
 * @param 
 *     Output of the task
 * @param 
 *     {@link Task} that is created by this factory
 *
 * @author kpiwko
 */
public interface TaskFactory> {

    /**
     * Creates an instance of the task
     *
     * @return Task instance
     */
    TASK create();

    /**
     * Returns a collection of aliases for this task factory. An alias can be used to get a task
     * from the {@link TaskRegistry}
     */
    Collection aliases();

    public static class ExecutionServiceInjector {
        > TASK inject(TASK task) {
            task.setExecutionService(Spacelift.service());
            return task;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy