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

hudson.model.Slave Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 *
 * Copyright (c) 2004-2010 Oracle Corporation.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *
 *    Kohsuke Kawaguchi, Erik Ramfelt, Martin Eigenbrodt, Stephen Connolly, Tom Huybrechts
 *
 *
 *******************************************************************************/ 

package hudson.model;

import hudson.FilePath;
import hudson.Launcher;
import hudson.Util;
import hudson.Launcher.RemoteLauncher;
import hudson.diagnosis.OldDataMonitor;
import hudson.model.Descriptor.FormException;
import hudson.remoting.Callable;
import hudson.remoting.VirtualChannel;
import hudson.slaves.CommandLauncher;
import hudson.slaves.ComputerLauncher;
import hudson.slaves.DumbSlave;
import hudson.slaves.JNLPLauncher;
import hudson.slaves.NodeDescriptor;
import hudson.slaves.NodeProperty;
import hudson.slaves.NodePropertyDescriptor;
import hudson.slaves.RetentionStrategy;
import hudson.slaves.SlaveComputer;
import hudson.util.ClockDifference;
import hudson.util.DescribableList;
import hudson.util.FormValidation;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import javax.servlet.ServletException;

import org.apache.commons.io.IOUtils;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.HttpResponse;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;

/**
 * Information about a Hudson slave node.
 *
 * 

Ideally this would have been in the hudson.slaves package, but * for compatibility reasons, it can't. * *

TODO: move out more stuff to {@link DumbSlave}. * * @author Kohsuke Kawaguchi */ public abstract class Slave extends Node implements Serializable { /** * Name of this slave node. */ protected String name; /** * Description of this node. */ private final String description; /** * Path to the root of the workspace from the view point of this node, such * as "/hudson" */ protected final String remoteFS; /** * Number of executors of this node. */ private int numExecutors = 2; /** * Job allocation strategy. */ private Mode mode; /** * Slave availablility strategy. */ private RetentionStrategy retentionStrategy; /** * The starter that will startup this slave. */ private ComputerLauncher launcher; /** * Whitespace-separated labels. */ private String label = ""; private /*almost final*/ DescribableList, NodePropertyDescriptor> nodeProperties = new DescribableList, NodePropertyDescriptor>(Hudson.getInstance()); /** * Lazily computed set of labels from {@link #label}. */ private transient volatile Set





© 2015 - 2025 Weber Informatics LLC | Privacy Policy