@Extension public class DatadogComputerListener extends ComputerListener
ComputerListener
to trigger events and calculate metrics:
- When a computer gets online, the onOnline(Computer, TaskListener)
method will be invoked.
- When a computer gets offline, the onOffline(Computer, OfflineCause)
method will be invoked.
- When a computer gets temporarily online, the onTemporarilyOnline(Computer)
method will be invoked.
- When a computer gets temporarily offline, the onTemporarilyOffline(Computer, OfflineCause)
method will be invoked.
- When a computer failed to launch, the onLaunchFailure(Computer, TaskListener)
method will be invoked.ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
DatadogComputerListener() |
Modifier and Type | Method and Description |
---|---|
void |
onLaunchFailure(Computer computer,
TaskListener taskListener) |
void |
onOffline(Computer computer,
OfflineCause cause) |
void |
onOnline(Computer computer,
TaskListener listener) |
void |
onTemporarilyOffline(Computer computer,
OfflineCause cause) |
void |
onTemporarilyOnline(Computer computer) |
all, onConfigurationChange, onOffline, onOnline, preLaunch, preOnline, register, unregister
public void onOnline(Computer computer, TaskListener listener) throws IOException, InterruptedException
onOnline
in class ComputerListener
IOException
InterruptedException
public void onOffline(@Nonnull Computer computer, @CheckForNull OfflineCause cause)
onOffline
in class ComputerListener
public void onTemporarilyOnline(Computer computer)
onTemporarilyOnline
in class ComputerListener
public void onTemporarilyOffline(Computer computer, OfflineCause cause)
onTemporarilyOffline
in class ComputerListener
public void onLaunchFailure(Computer computer, TaskListener taskListener) throws IOException, InterruptedException
onLaunchFailure
in class ComputerListener
IOException
InterruptedException
Copyright © 2016–2023. All rights reserved.