Class ScriptCallback<T extends Throwable>

  • 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:
    Serialized Form
    • Constructor Detail

      • 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 Detail

      • 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
      • checkRoles

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