Package jenkins.model

Class Jenkins.MasterComputer

    • Field Detail

      • localChannel

        @Deprecated
        public static final hudson.remoting.LocalChannel localChannel
        Deprecated.
        as of 1.558 Use FilePath.localChannel
        LocalChannel instance that can be used to execute programs locally.
    • Constructor Detail

      • MasterComputer

        protected MasterComputer()
    • Method Detail

      • isAlive

        protected boolean isAlive()
        Will always keep this guy alive so that it can function as a fallback to execute Queue.FlyweightTasks. See JENKINS-7291.
        Overrides:
        isAlive in class Computer
      • isUnix

        public Boolean isUnix()
        Description copied from class: Computer
        True if this computer is a Unix machine (as opposed to Windows machine).
        Specified by:
        isUnix in class Computer
        Returns:
        null if the computer is disconnected and therefore we don't know whether it is Unix or not.
      • doConfigDotXml

        @WebMethod(name="config.xml")
        public void doConfigDotXml​(org.kohsuke.stapler.StaplerRequest req,
                                   org.kohsuke.stapler.StaplerResponse rsp)
                            throws IOException,
                                   javax.servlet.ServletException
        Description copied from class: Computer
        Accepts config.xml submission, as well as serve it.
        Overrides:
        doConfigDotXml in class Computer
        Throws:
        IOException
        javax.servlet.ServletException
      • hasPermission

        public boolean hasPermission​(Permission permission)
        Description copied from interface: AccessControlled
        Convenient short-cut for getACL().hasPermission(permission)
      • getChannel

        public hudson.remoting.VirtualChannel getChannel()
        Description copied from class: Computer
        Gets the channel that can be used to run a program on this computer.
        Specified by:
        getChannel in class Computer
        Returns:
        never null when Computer.isOffline()==false.
      • doLaunchSlaveAgent

        public void doLaunchSlaveAgent​(org.kohsuke.stapler.StaplerRequest req,
                                       org.kohsuke.stapler.StaplerResponse rsp)
                                throws IOException,
                                       javax.servlet.ServletException
        Description copied from class: Computer
        If Computer.getChannel()==null, attempts to relaunch the agent.
        Specified by:
        doLaunchSlaveAgent in class Computer
        Throws:
        IOException
        javax.servlet.ServletException
      • _connect

        protected Future<?> _connect​(boolean forceReconnect)
        Description copied from class: Computer
        Allows implementing-classes to provide an implementation for the connect method.

        If already connected or if this computer doesn't support proactive launching, no-op. This method may return immediately while the launch operation happens asynchronously.

        Specified by:
        _connect in class Computer
        Parameters:
        forceReconnect - If true and a connect activity is already in progress, it will be cancelled and the new one will be started. If false, and a connect activity is already in progress, this method will do nothing and just return the pending connection operation.
        Returns:
        A Future representing pending completion of the task. The 'completion' includes both a successful completion and a non-successful completion (such distinction typically doesn't make much sense because as soon as Computer is connected it can be disconnected by some other threads.)
        See Also:
        Computer.disconnect()