hudson.maven
Class MavenComputerListener
java.lang.Object
hudson.slaves.ComputerListener
hudson.maven.MavenComputerListener
- All Implemented Interfaces:
- ExtensionPoint
@Extension
public class MavenComputerListener
- extends ComputerListener
When a slave is connected, copy maven-agent.jar and maven-intercepter.jar
- Author:
- Kohsuke Kawaguchi
Methods inherited from class hudson.slaves.ComputerListener |
all, onConfigurationChange, onLaunchFailure, onOffline, onOnline, onOnline, onTemporarilyOffline, onTemporarilyOnline, preLaunch, register, unregister |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MavenComputerListener
public MavenComputerListener()
preOnline
public void preOnline(Computer c,
hudson.remoting.Channel channel,
FilePath root,
TaskListener listener)
throws IOException,
InterruptedException
- Description copied from class:
ComputerListener
- Called before a
Computer
is marked online.
This enables you to do some work on all the slaves
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 class ComputerListener
channel
- This is the channel object to talk to the slave.
(This is the same object returned by Computer.getChannel()
once
it's connected.root
- The directory where this slave stores files.
The same as Node.getRootPath()
, except that method returns
null until the slave 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)
Copyright © 2004-2013. All Rights Reserved.