public class RegexNameVerifier extends LabelVerifier
Modifier and Type | Class and Description |
---|---|
static class |
RegexNameVerifier.DescriptorImpl |
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
RegexNameVerifier(String regexExpression) |
Modifier and Type | Method and Description |
---|---|
String |
getRegexExpression() |
void |
verify(LabelAtom label,
Computer c,
hudson.remoting.Channel channel,
FilePath root,
TaskListener listener)
Called before a
Computer becomes online to verify if the label assignment is correct. |
getDescriptor
@DataBoundConstructor public RegexNameVerifier(String regexExpression)
public String getRegexExpression()
public void verify(LabelAtom label, Computer c, hudson.remoting.Channel channel, FilePath root, TaskListener listener) throws IOException, InterruptedException
LabelVerifier
Computer
becomes online to verify if the label assignment is correct.verify
in class LabelVerifier
label
- Label whose validity you'll check.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.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.Copyright © 2016–2019. All rights reserved.