package jenkins.python.expoint;
import hudson.ExtensionPoint;
import hudson.Extension;
import hudson.model.*;
import hudson.remoting.Channel;
import hudson.util.DescriptorList;
import hudson.util.StreamTaskListener;
import java.io.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.tools.ant.util.DeweyDecimal;
import hudson.slaves.*;
import hudson.slaves.ComputerLauncher.*;
import jenkins.model.Jenkins;
import hudson.model.AbstractDescribableImpl.*;
import jenkins.python.DataConvertor;
import jenkins.python.PythonExecutor;
/**
* This class was automatically generated by the PWM tool on 2014/03/21.
* @see hudson.slaves.ComputerLauncher
*/
public abstract class ComputerLauncherPW extends ComputerLauncher {
private transient PythonExecutor pexec;
private void initPython() {
if (pexec == null) {
pexec = new PythonExecutor(this);
String[] jMethods = new String[0];
String[] pFuncs = new String[0];
Class[][] argTypes = new Class[0][];
pexec.checkAbstrMethods(jMethods, pFuncs, argTypes);
String[] functions = new String[8];
functions[0] = "is_launch_supported";
functions[1] = "launch";
functions[2] = "launch";
functions[3] = "after_disconnect";
functions[4] = "after_disconnect";
functions[5] = "before_disconnect";
functions[6] = "before_disconnect";
functions[7] = "get_descriptor";
int[] argsCount = new int[8];
argsCount[0] = 0;
argsCount[1] = 2;
argsCount[2] = 2;
argsCount[3] = 2;
argsCount[4] = 2;
argsCount[5] = 2;
argsCount[6] = 2;
argsCount[7] = 0;
pexec.registerFunctions(functions, argsCount);
}
}
@Override
public boolean isLaunchSupported() {
initPython();
if (pexec.isImplemented(0)) {
return pexec.execPythonBool("is_launch_supported");
} else {
return super.isLaunchSupported();
}
}
@Override
public void launch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException {
initPython();
if (pexec.isImplemented(1)) {
pexec.execPythonVoid("launch", computer, listener);
} else {
super.launch(computer, listener);
}
}
@Override
public void launch(SlaveComputer computer, StreamTaskListener listener) throws IOException, InterruptedException {
initPython();
if (pexec.isImplemented(2)) {
pexec.execPythonVoid("launch", computer, listener);
} else {
super.launch(computer, listener);
}
}
@Override
public void afterDisconnect(SlaveComputer computer, TaskListener listener) {
initPython();
if (pexec.isImplemented(3)) {
pexec.execPythonVoid("after_disconnect", computer, listener);
} else {
super.afterDisconnect(computer, listener);
}
}
@Override
public void afterDisconnect(SlaveComputer computer, StreamTaskListener listener) {
initPython();
if (pexec.isImplemented(4)) {
pexec.execPythonVoid("after_disconnect", computer, listener);
} else {
super.afterDisconnect(computer, listener);
}
}
@Override
public void beforeDisconnect(SlaveComputer computer, TaskListener listener) {
initPython();
if (pexec.isImplemented(5)) {
pexec.execPythonVoid("before_disconnect", computer, listener);
} else {
super.beforeDisconnect(computer, listener);
}
}
@Override
public void beforeDisconnect(SlaveComputer computer, StreamTaskListener listener) {
initPython();
if (pexec.isImplemented(6)) {
pexec.execPythonVoid("before_disconnect", computer, listener);
} else {
super.beforeDisconnect(computer, listener);
}
}
@Override
public Descriptor<ComputerLauncher> getDescriptor() {
initPython();
if (pexec.isImplemented(7)) {
return (Descriptor) pexec.execPython("get_descriptor");
} else {
return super.getDescriptor();
}
}
public boolean superIsLaunchSupported() {
return super.isLaunchSupported();
}
public void superLaunch(SlaveComputer computer, TaskListener listener) throws IOException, InterruptedException {
super.launch(computer, listener);
}
public void superLaunch(SlaveComputer computer, StreamTaskListener listener) throws IOException, InterruptedException {
super.launch(computer, listener);
}
public void superAfterDisconnect(SlaveComputer computer, TaskListener listener) {
super.afterDisconnect(computer, listener);
}
public void superAfterDisconnect(SlaveComputer computer, StreamTaskListener listener) {
super.afterDisconnect(computer, listener);
}
public void superBeforeDisconnect(SlaveComputer computer, TaskListener listener) {
super.beforeDisconnect(computer, listener);
}
public void superBeforeDisconnect(SlaveComputer computer, StreamTaskListener listener) {
super.beforeDisconnect(computer, listener);
}
public Descriptor<ComputerLauncher> superGetDescriptor() {
return super.getDescriptor();
}
public Object execPython(String function, Object... params) {
initPython();
return pexec.execPython(function, params);
}
public byte execPythonByte(String function, Object... params) {
initPython();
return pexec.execPythonByte(function, params);
}
public short execPythonShort(String function, Object... params) {
initPython();
return pexec.execPythonShort(function, params);
}
public char execPythonChar(String function, Object... params) {
initPython();
return pexec.execPythonChar(function, params);
}
public int execPythonInt(String function, Object... params) {
initPython();
return pexec.execPythonInt(function, params);
}
public long execPythonLong(String function, Object... params) {
initPython();
return pexec.execPythonLong(function, params);
}
public float execPythonFloat(String function, Object... params) {
initPython();
return pexec.execPythonFloat(function, params);
}
public double execPythonDouble(String function, Object... params) {
initPython();
return pexec.execPythonDouble(function, params);
}
public boolean execPythonBool(String function, Object... params) {
initPython();
return pexec.execPythonBool(function, params);
}
public void execPythonVoid(String function, Object... params) {
initPython();
pexec.execPythonVoid(function, params);
}
}