Skip to main content

Hudson Job Events

  2 posts   Feedicon  
Replies: 1 - Last Post: September 23, 2011 23:56
by: Winston Prakash
showing 1 - 2 of 2
Posted: September 14, 2011 07:40 by sanjoygh
Hi

We are currently working on integrating Hudson to our existing application. We need to trap the events when a new job is added, edited or deleted in Hudson programmatically. Does Hudson provide any API to trap these events?

Thanks in advance.

Regards
Sanjoygh
Posted: September 23, 2011 23:56 by Winston Prakash
One way of doing this to add an Extension to the Extension Point ItemListener. Here is a quick example

@Extension
public final class JobChangeListener extends ItemListener {

    public void onCreated(Item item) {
         
        if (item instanceof AbstractProject<?, ?>) {
             // You code here
        }  
..
Replies: 1 - Last Post: September 23, 2011 23:56
by: Winston Prakash
 
 
Close
loading
Please Confirm
Close