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

hudson.plugins.sshslaves.JavaProvider Maven / Gradle / Ivy

There is a newer version: 2.0.1
Show newest version
package hudson.plugins.sshslaves;

import com.trilead.ssh2.Connection;
import hudson.ExtensionList;
import hudson.ExtensionPoint;
import hudson.slaves.SlaveComputer;
import hudson.model.Hudson;
import hudson.model.TaskListener;

import java.util.List;
import java.util.Collections;

/**
 * Guess where Java is.
 */
public abstract class JavaProvider implements ExtensionPoint {
    /**
     * @deprecated
     *      Override {@link #getJavas(SlaveComputer, TaskListener, Connection)} instead.
     */
    public List getJavas(TaskListener listener, Connection connection) {
        return Collections.emptyList();
    }

    /**
     * Returns the list of possible places where java executable might exist.
     *
     * @return
     *      Can be empty but never null. Absolute path to the possible locations of Java.
     */
    public List getJavas(SlaveComputer computer, TaskListener listener, Connection connection) {
        return getJavas(listener,connection);
    }

    /**
     * All regsitered instances.
     */
    public static ExtensionList all() {
        return Hudson.getInstance().getExtensionList(JavaProvider.class);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy