本文整理了Java中hudson.model.Hudson.getComputer()
方法的一些代码示例,展示了Hudson.getComputer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hudson.getComputer()
方法的具体详情如下:
包路径:hudson.model.Hudson
类名称:Hudson
方法名:getComputer
暂无
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Gets the corresponding {@link Computer} object.
*
* @return this method can return null if there's no {@link Computer} object
* for this node, such as when this node has no executors at all.
*/
public final Computer toComputer() {
return Hudson.getInstance().getComputer(this);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Gets the corresponding {@link Computer} object.
*
* @return
* this method can return null if there's no {@link Computer} object for this node,
* such as when this node has no executors at all.
*/
public final Computer toComputer() {
return Hudson.getInstance().getComputer(this);
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
public Computer getDynamic(String token, StaplerRequest req, StaplerResponse rsp) {
return Hudson.getInstance().getComputer(token);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Gets the corresponding {@link Computer} object.
*
* @return
* this method can return null if there's no {@link Computer} object for this node,
* such as when this node has no executors at all.
*/
public final Computer toComputer() {
return Hudson.getInstance().getComputer(this);
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Gets the corresponding {@link Computer} object.
*
* @return
* this method can return null if there's no {@link Computer} object for this node,
* such as when this node has no executors at all.
*/
public final Computer toComputer() {
return Hudson.getInstance().getComputer(this);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
public Computer getDynamic(String token, StaplerRequest req, StaplerResponse rsp) {
return Hudson.getInstance().getComputer(token);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
public Computer getDynamic(String token, StaplerRequest req, StaplerResponse rsp) {
return Hudson.getInstance().getComputer(token);
}
代码示例来源:origin: hudson/hudson-2.x
public Computer getDynamic(String token, StaplerRequest req, StaplerResponse rsp) {
return Hudson.getInstance().getComputer(token);
}
代码示例来源:origin: org.hudsonci.plugins/run-condition
/**
* Gets the names of all configured slaves, regardless whether they are online.
*
* @return list with all slave names
*/
@SuppressWarnings("deprecation")
private static List<String> getSlaveNames() {
ComputerSet computers = Hudson.getInstance().getComputer();
List<String> slaveNames = computers.get_slaveNames();
// slaveNames is unmodifiable, therefore create a new list
List<String> test = new ArrayList<String>();
test.addAll(slaveNames);
// add 'magic' name for master, so all nodes can be handled the same way
if (!test.contains(MASTER)) {
test.add(0, MASTER);
}
return test;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
@CLIResolver
public Computer getComputer(@Argument(required = true, metaVar = "NAME", usage = "Node name") String name) {
return getComputer(name, false);
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Handles JNLP slave agent connection request.
*/
private void runJnlpConnect(DataInputStream in, PrintWriter out) throws IOException, InterruptedException {
if (!getSecretKey().equals(in.readUTF())) {
error(out, "Unauthorized access");
return;
}
final String nodeName = in.readUTF();
SlaveComputer computer = (SlaveComputer) Hudson.getInstance().getComputer(nodeName, true);
if (computer == null) {
error(out, "No such slave: " + nodeName);
return;
}
if (computer.getChannel() != null) {
error(out, nodeName + " is already connected to this master. Rejecting this connection.");
return;
}
out.println(Engine.GREETING_SUCCESS);
jnlpConnect(computer);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Handles JNLP slave agent connection request.
*/
private void runJnlpConnect(DataInputStream in, PrintWriter out) throws IOException, InterruptedException {
if(!getSecretKey().equals(in.readUTF())) {
error(out, "Unauthorized access");
return;
}
final String nodeName = in.readUTF();
SlaveComputer computer = (SlaveComputer) Hudson.getInstance().getComputer(nodeName);
if(computer==null) {
error(out, "No such slave: "+nodeName);
return;
}
if(computer.getChannel()!=null) {
error(out, nodeName+" is already connected to this master. Rejecting this connection.");
return;
}
out.println(Engine.GREETING_SUCCESS);
jnlpConnect(computer);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Handles JNLP slave agent connection request.
*/
private void runJnlpConnect(DataInputStream in, PrintWriter out) throws IOException, InterruptedException {
if(!getSecretKey().equals(in.readUTF())) {
error(out, "Unauthorized access");
return;
}
final String nodeName = in.readUTF();
SlaveComputer computer = (SlaveComputer) Hudson.getInstance().getComputer(nodeName);
if(computer==null) {
error(out, "No such slave: "+nodeName);
return;
}
if(computer.getChannel()!=null) {
error(out, nodeName+" is already connected to this master. Rejecting this connection.");
return;
}
out.println(Engine.GREETING_SUCCESS);
jnlpConnect(computer);
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Handles JNLP slave agent connection request.
*/
private void runJnlpConnect(DataInputStream in, PrintWriter out) throws IOException, InterruptedException {
if(!getSecretKey().equals(in.readUTF())) {
error(out, "Unauthorized access");
return;
}
final String nodeName = in.readUTF();
SlaveComputer computer = (SlaveComputer) Hudson.getInstance().getComputer(nodeName);
if(computer==null) {
error(out, "No such slave: "+nodeName);
return;
}
if(computer.getChannel()!=null) {
error(out, nodeName+" is already connected to this master. Rejecting this connection.");
return;
}
out.println(Engine.GREETING_SUCCESS);
jnlpConnect(computer);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
SlaveComputer computer = (SlaveComputer) Hudson.getInstance().getComputer(nodeName);
if(computer==null) {
error(out, "No such slave: "+nodeName);
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
SlaveComputer computer = (SlaveComputer) Hudson.getInstance().getComputer(nodeName);
if(computer==null) {
error(out, "No such slave: "+nodeName);
代码示例来源:origin: hudson/hudson-2.x
SlaveComputer computer = (SlaveComputer) Hudson.getInstance().getComputer(nodeName);
if(computer==null) {
error(out, "No such slave: "+nodeName);
代码示例来源:origin: org.eclipse.hudson/hudson-core
SlaveComputer computer = (SlaveComputer) Hudson.getInstance().getComputer(nodeName, true);
if (computer == null) {
error(out, "No such slave: " + nodeName);
代码示例来源:origin: org.jenkins-ci.plugins/scriptler
Computer comp = Hudson.getInstance().getComputer(node);
if (comp == null && "(master)".equals(node)) {
output = MasterComputer.localChannel.call(new GroovyScript(scriptTxt, parameters, false, new StreamTaskListener(sos)));
内容来源于网络,如有侵权,请联系作者删除!