Package jenkins.metrics.api
Class QueueItemMetricsListener
- java.lang.Object
-
- jenkins.metrics.api.QueueItemMetricsListener
-
- All Implemented Interfaces:
ExtensionPoint
public abstract class QueueItemMetricsListener extends Object implements ExtensionPoint
Receives details of metrics events about queue items.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description QueueItemMetricsListener()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExtensionList<QueueItemMetricsListener>
all()
All the registeredQueueItemMetricsListener
instances.static void
notifyCancelled(QueueItemMetricsEvent event)
Notify all listeners about the cancellation of an item.static void
notifyFinished(QueueItemMetricsEvent event)
Notify all listeners about an item having finished execution.static void
notifyQueued(QueueItemMetricsEvent event)
Notify all listeners about the enqueuing of an item.static void
notifyStarted(QueueItemMetricsEvent event)
Notify all listeners about an item having started execution.void
onCancelled(QueueItemMetricsEvent event)
Called at most once for eachQueue.Item
some time after it is cancelled from the queue.void
onFinished(QueueItemMetricsEvent event)
Called at most once for eachQueue.Item
some time after it finishes executing.void
onQueued(QueueItemMetricsEvent event)
Called at most once for eachQueue.Item
some time after it enters the queue.void
onStarted(QueueItemMetricsEvent event)
Called at most once for eachQueue.Item
some time after it leaves the queue and starts executing.
-
-
-
Method Detail
-
onQueued
public void onQueued(QueueItemMetricsEvent event)
Called at most once for eachQueue.Item
some time after it enters the queue.- Parameters:
event
- the event.
-
onCancelled
public void onCancelled(QueueItemMetricsEvent event)
Called at most once for eachQueue.Item
some time after it is cancelled from the queue.- Parameters:
event
- the event.
-
onStarted
public void onStarted(QueueItemMetricsEvent event)
Called at most once for eachQueue.Item
some time after it leaves the queue and starts executing.- Parameters:
event
- the event.
-
onFinished
public void onFinished(QueueItemMetricsEvent event)
Called at most once for eachQueue.Item
some time after it finishes executing.- Parameters:
event
- the event.
-
all
public static ExtensionList<QueueItemMetricsListener> all()
All the registeredQueueItemMetricsListener
instances.- Returns:
- all the registered
QueueItemMetricsListener
instances.
-
notifyQueued
public static void notifyQueued(QueueItemMetricsEvent event)
Notify all listeners about the enqueuing of an item.- Parameters:
event
- the event.
-
notifyCancelled
public static void notifyCancelled(QueueItemMetricsEvent event)
Notify all listeners about the cancellation of an item.- Parameters:
event
- the event.
-
notifyStarted
public static void notifyStarted(QueueItemMetricsEvent event)
Notify all listeners about an item having started execution.- Parameters:
event
- the event.
-
notifyFinished
public static void notifyFinished(QueueItemMetricsEvent event)
Notify all listeners about an item having finished execution.- Parameters:
event
- the event.
-
-