Class ScriptCallback<T extends Throwable>

java.lang.Object
org.biouno.unochoice.util.ScriptCallback<T>
All Implemented Interfaces:
hudson.remoting.Callable<Object,T>, Serializable, org.jenkinsci.remoting.RoleSensitive

public class ScriptCallback<T extends Throwable> extends Object implements hudson.remoting.Callable<Object,T>
A callable (Jenkins remoting API) object that executes the script locally (when executed in the master) or remotely.
Since:
0.1
Author:
dynamic-parameter-plugin, Bruno P. Kinoshita
See Also:
  • Constructor Details

    • ScriptCallback

      public ScriptCallback(String name, Script script, Map<String,String> parameters)
      Create a new ScriptCallback. This can be used to execute code either local or remotely.
      Parameters:
      name - callable name
      script - script
      parameters - Map of parameters
  • Method Details

    • getName

      public String getName()
      Get script callback name.
      Returns:
      name
    • getParameters

      public Map<String,String> getParameters()
      Get script parameters. Used to populate bound variables.
      Returns:
      Map with parameters
    • getScript

      public Script getScript()
      Get the script.
      Returns:
      Script script
    • call

      public Object call() throws T
      Specified by:
      call in interface hudson.remoting.Callable<Object,T extends Throwable>
      Throws:
      T extends Throwable
    • checkRoles

      public void checkRoles(org.jenkinsci.remoting.RoleChecker roleChecker) throws SecurityException
      Specified by:
      checkRoles in interface org.jenkinsci.remoting.RoleSensitive
      Throws:
      SecurityException