hudson.model.listeners
Class SCMPollListener

java.lang.Object
  extended by 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
SCMPollListener()
           
 
Method Summary
static ExtensionList<SCMPollListener> all()
          Returns all the registered SCMPollListeners.
static void fireBeforePolling(AbstractProject<?,?> project, TaskListener listener)
           
static void firePollingFailed(AbstractProject<?,?> project, TaskListener listener, Throwable exception)
           
static void firePollingSuccess(AbstractProject<?,?> project, TaskListener listener, PollingResult result)
           
 void onBeforePolling(AbstractProject<?,?> project, TaskListener listener)
          Called before the polling execution.
 void onPollingFailed(AbstractProject<?,?> project, TaskListener listener, Throwable exception)
          Called when the polling concluded with an error.
 void onPollingSuccess(AbstractProject<?,?> project, TaskListener listener, PollingResult result)
          Called when the polling successfully concluded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCMPollListener

public SCMPollListener()
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 include InterruptedException (that corresponds to the user cancelling it), some anticipated problems like IOException, 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 registered SCMPollListeners.



Copyright © 2004-2013. All Rights Reserved.