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: 3.0.3
Show newest version
package hudson.plugins.sshslaves;

import ch.ethz.ssh2.Connection;
import hudson.ExtensionList;
import hudson.ExtensionPoint;
import hudson.model.Hudson;
import hudson.model.TaskListener;
import hudson.slaves.SlaveComputer;
import java.util.Collections;
import java.util.List;

/**
 * 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