Package jenkins.util
Class SystemProperties.AgentCopier
- java.lang.Object
-
- hudson.slaves.ComputerListener
-
- jenkins.util.SystemProperties.AgentCopier
-
- All Implemented Interfaces:
ExtensionPoint
- Enclosing class:
- SystemProperties
@Extension @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final class SystemProperties.AgentCopier extends ComputerListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description AgentCopier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
preOnline(Computer c, hudson.remoting.Channel channel, FilePath root, TaskListener listener)
Called before aComputer
is marked online.-
Methods inherited from class hudson.slaves.ComputerListener
all, onConfigurationChange, onLaunchFailure, onOffline, onOffline, onOnline, onOnline, onTemporarilyOffline, onTemporarilyOnline, preLaunch, register, unregister
-
-
-
-
Method Detail
-
preOnline
public void preOnline(Computer c, hudson.remoting.Channel channel, FilePath root, TaskListener listener) throws IOException, InterruptedException
Description copied from class:ComputerListener
Called before aComputer
is marked online.This enables you to do some work on all the agents as they get connected. Unlike
ComputerListener.onOnline(Computer, TaskListener)
, a failure to carry out this function normally will prevent a computer from marked as online.- Overrides:
preOnline
in classComputerListener
channel
- This is the channel object to talk to the agent. (This is the same object returned byComputer.getChannel()
once it's connected.root
- The directory where this agent stores files. The same asNode.getRootPath()
, except that method returns null until the agent is connected. So this parameter is passed explicitly instead.listener
- This is connected to the launch log of the computer. Since this method is called synchronously from the thread that launches a computer, if this method performs a time-consuming operation, this listener should be notified of the progress. This is also a good listener for reporting problems.- Throws:
IOException
- Exceptions will be recorded to the listener, and the computer will not become online.InterruptedException
- Exceptions will be recorded to the listener, and the computer will not become online.- See Also:
ComputerListener.onOnline(Computer, TaskListener)
-
-