Class DatadogComputerListener
- java.lang.Object
-
- hudson.slaves.ComputerListener
-
- org.datadog.jenkins.plugins.datadog.listeners.DatadogComputerListener
-
- All Implemented Interfaces:
ExtensionPoint
@Extension public class DatadogComputerListener extends ComputerListener
This class registers anComputerListener
to trigger events and calculate metrics: - When a computer gets online, theonOnline(Computer, TaskListener)
method will be invoked. - When a computer gets offline, theonOffline(Computer, OfflineCause)
method will be invoked. - When a computer gets temporarily online, theonTemporarilyOnline(Computer)
method will be invoked. - When a computer gets temporarily offline, theonTemporarilyOffline(Computer, OfflineCause)
method will be invoked. - When a computer failed to launch, theonLaunchFailure(Computer, TaskListener)
method will be invoked.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description DatadogComputerListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
Methods inherited from class hudson.slaves.ComputerListener
all, onConfigurationChange, onOffline, onOnline, preLaunch, preOnline, register, unregister
-
-
-
-
Method Detail
-
onOnline
public void onOnline(Computer computer, TaskListener listener) throws IOException, InterruptedException
- Overrides:
onOnline
in classComputerListener
- Throws:
IOException
InterruptedException
-
onOffline
public void onOffline(@Nonnull Computer computer, @CheckForNull OfflineCause cause)
- Overrides:
onOffline
in classComputerListener
-
onTemporarilyOnline
public void onTemporarilyOnline(Computer computer)
- Overrides:
onTemporarilyOnline
in classComputerListener
-
onTemporarilyOffline
public void onTemporarilyOffline(Computer computer, OfflineCause cause)
- Overrides:
onTemporarilyOffline
in classComputerListener
-
onLaunchFailure
public void onLaunchFailure(Computer computer, TaskListener taskListener) throws IOException, InterruptedException
- Overrides:
onLaunchFailure
in classComputerListener
- Throws:
IOException
InterruptedException
-
-