com.atlassian.event.api
Annotation Type EventListener


@Retention(value=RUNTIME)
@Target(value=METHOD)
@Documented
public @interface EventListener

Used to annotate event listener methods. Methods should be public and take one parameter which is the event to be handled.

For example, the following class implements a simple event listener:

      public class TestListener {
        @EventListener
        public void onEvent(SampleEvent event) {
            System.out.println("Handled an event: " + event);
        }
    }
 

Since:
2.0
See Also:
AnnotatedMethodsListenerHandler



Copyright © 2006-2010 Atlassian. All Rights Reserved.