提交 d20d74d9 编写于 作者: K kohsuke

updated DynamicLabeller to support auto discovery

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15662 71c3de6d-444a-0410-be80-ed276b4c234a
上级 2b9f3b2d
......@@ -23,15 +23,11 @@
*/
package hudson.tasks;
import hudson.model.Label;
import hudson.model.Node;
import hudson.model.Descriptor;
import hudson.ExtensionListView;
import hudson.remoting.VirtualChannel;
import hudson.tasks.labelers.OSLabeler;
import java.util.Set;
import java.util.List;
import java.util.ArrayList;
import java.util.Set;
/**
* Support for autoconfiguration of nodes.
......@@ -40,12 +36,7 @@ import java.util.ArrayList;
*/
public interface LabelFinder {
public static final List<DynamicLabeler> LABELERS = new ArrayList<DynamicLabeler>()/*{
// Taking adding default DynamicLabelers out of main trunk
{
add(OSLabeler.INSTANCE);
}
}*/;
public static final List<DynamicLabeler> LABELERS = ExtensionListView.createList(DynamicLabeler.class);
/**
* Find the labels that the node supports.
......
......@@ -37,13 +37,8 @@ import java.util.Set;
* @author connollys
* @since 25-May-2007 15:25:03
*/
// @Extension --- not live yet
public class OSLabeler extends DynamicLabeler {
public static OSLabeler INSTANCE = new OSLabeler();
private OSLabeler() {
}
public Set<String> findLabels(VirtualChannel channel) {
try {
return channel.call(new OSLabelFinder());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册