Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to wire and use ListenerHandler and ListenerInvoker

Christopher Dancy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2013

In trying to develop a NotificationType plugin I see that EventListener is now deprecated. In it's place appears to be ListenerHandler and ListenerInvoker and those classes under "com.atlassian.event.spi". Are there any examples on how to wire and/or use these in place of EventListener?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 23, 2013

Use com.atlassian.event.api.EventPublisher#register on your listener object and annotate callback methods with @EventListener, e.g.:

@EventListener
public void handleEvent(BuildCompletedEvent event) {}

Christopher Dancy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2013

That's very awesome. Thanks for pointing me in the right direction.

Christopher Dancy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2013

In playing around I can't seem to figure out how to get an event based on kicking a build/plan. I simply want a callback when a plan is kicked not when it's jobs are kicked. I browsed through the events here, http://docs.atlassian.com/atlassian-bamboo/4.1/com/atlassian/bamboo/event/, and have tried all that make sense but nothing seems to be working. Any ideas/suggestions?

Christopher Dancy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 6, 2013

Just to close the loop here: there does not appear to be an "Event" for kicking a build plan but implementing a PreChainAction does do the trick. I was simply looking for something to follow the "Event" model here.

TAGS
AUG Leaders

Atlassian Community Events