Package hudson.model.listeners
Class SCMPollListener
java.lang.Object
hudson.model.listeners.SCMPollListener
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Constructor Details
-
SCMPollListener
public SCMPollListener()
-
-
Method Details
-
onBeforePolling
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
-
firePollingSuccess
public static void firePollingSuccess(AbstractProject<?, ?> project, TaskListener listener, PollingResult result) -
firePollingFailed
public static void firePollingFailed(AbstractProject<?, ?> project, TaskListener listener, Throwable exception) -
all
Returns all the registeredSCMPollListeners.
-