package jenkins.python.expoint; import hudson.ExtensionList; import hudson.ExtensionPoint; import hudson.triggers.SafeTimerTask; import hudson.triggers.Trigger; import jenkins.model.Jenkins; import java.util.Random; import java.util.Timer; import java.util.logging.Logger; import hudson.model.*; import hudson.model.AperiodicWork.*; import org.acegisecurity.context.SecurityContext; import org.acegisecurity.context.SecurityContextHolder; import java.util.TimerTask; import java.util.logging.Level; import hudson.security.ACL; import hudson.triggers.*; import hudson.triggers.SafeTimerTask.*; import jenkins.python.DataConvertor; import jenkins.python.PythonExecutor; /** * This class was automatically generated by the PWM tool on 2014/03/21. * @see hudson.model.AperiodicWork */ public abstract class AperiodicWorkPW extends AperiodicWork { private transient PythonExecutor pexec; private void initPython() { if (pexec == null) { pexec = new PythonExecutor(this); String[] jMethods = new String[4]; jMethods[0] = "getRecurrencePeriod"; jMethods[1] = "getNewInstance"; jMethods[2] = "doAperiodicRun"; jMethods[3] = "doRun"; String[] pFuncs = new String[4]; pFuncs[0] = "get_recurrence_period"; pFuncs[1] = "get_new_instance"; pFuncs[2] = "do_aperiodic_run"; pFuncs[3] = "do_run"; Class[][] argTypes = new Class[4][]; argTypes[0] = new Class[0]; argTypes[1] = new Class[0]; argTypes[2] = new Class[0]; argTypes[3] = new Class[0]; pexec.checkAbstrMethods(jMethods, pFuncs, argTypes); String[] functions = new String[1]; functions[0] = "get_initial_delay"; int[] argsCount = new int[1]; argsCount[0] = 0; pexec.registerFunctions(functions, argsCount); } } @Override public long getRecurrencePeriod() { initPython(); return pexec.execPythonLong("get_recurrence_period"); } @Override public AperiodicWork getNewInstance() { initPython(); return (AperiodicWork) pexec.execPython("get_new_instance"); } @Override public void doAperiodicRun() { initPython(); pexec.execPythonVoid("do_aperiodic_run"); } @Override public long getInitialDelay() { initPython(); if (pexec.isImplemented(0)) { return pexec.execPythonLong("get_initial_delay"); } else { return super.getInitialDelay(); } } public long superGetInitialDelay() { return super.getInitialDelay(); } 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); } }