Package hudson.model.listeners
Class SCMPollListener
- java.lang.Object
-
- hudson.model.listeners.SCMPollListener
-
- All Implemented Interfaces:
ExtensionPoint
public abstract class SCMPollListener extends Object implements ExtensionPoint
A hook for listening to polling activities in Jenkins.- Since:
- 1.474
- Author:
- Christian Wolfgang, Kohsuke Kawaguchi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description SCMPollListener()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExtensionList<SCMPollListener>all()Returns all the registeredSCMPollListeners.static voidfireBeforePolling(AbstractProject<?,?> project, TaskListener listener)static voidfirePollingFailed(AbstractProject<?,?> project, TaskListener listener, Throwable exception)static voidfirePollingSuccess(AbstractProject<?,?> project, TaskListener listener, PollingResult result)voidonBeforePolling(AbstractProject<?,?> project, TaskListener listener)Called before the polling execution.voidonPollingFailed(AbstractProject<?,?> project, TaskListener listener, Throwable exception)Called when the polling concluded with an error.voidonPollingSuccess(AbstractProject<?,?> project, TaskListener listener, PollingResult result)Called when the polling successfully concluded.
-
-
-
Method Detail
-
onBeforePolling
public void onBeforePolling(AbstractProject<?,?> project, TaskListener listener)
Called before the polling execution.- Parameters:
project- Project that's about to run polling.listener- Connected to the polling log.
-
onPollingSuccess
public void onPollingSuccess(AbstractProject<?,?> project, TaskListener listener, PollingResult result)
Called when the polling successfully concluded.- Parameters:
result- The result of the polling.
-
onPollingFailed
public void onPollingFailed(AbstractProject<?,?> project, TaskListener listener, Throwable exception)
Called when the polling concluded with an error.- Parameters:
exception- The problem reported. This can includeInterruptedException(that corresponds to the user cancelling it), some anticipated problems likeIOException, or bug in the code (RuntimeException)
-
fireBeforePolling
public static void fireBeforePolling(AbstractProject<?,?> project, TaskListener listener)
-
firePollingSuccess
public static void firePollingSuccess(AbstractProject<?,?> project, TaskListener listener, PollingResult result)
-
firePollingFailed
public static void firePollingFailed(AbstractProject<?,?> project, TaskListener listener, Throwable exception)
-
all
public static ExtensionList<SCMPollListener> all()
Returns all the registeredSCMPollListeners.
-
-