com.neeve.aep.annotations
Annotation Type EventHandler


@Retention(value=RUNTIME)
public @interface EventHandler

Used to annotate a method that serves as an AEP event handler.

The user should annotate methods that serves as AEP event handlers with this annotation. Upon creation, the AEP engine searches the event handler container objects supplied to the engine constructor for methods that are annotated with this annotation. If the annotated method accepts an SMA message as its (only) argument, it is treated as a message handler i.e. inbound messages are dispatched to the annotated method. Otherwise, if the method accepts an event object as its (only) argument, then the method is treated as the handler for the same event type as the method argument. All other methods annotated with this annotated are flagged as erroneous annotations and ignored.


Optional Element Summary
 boolean localOnly
          Indicates that only events originating locally to the aep should be considered.
 String source
           
 

source

public abstract String source
Default:
"*"

localOnly

public abstract boolean localOnly
Indicates that only events originating locally to the aep should be considered. Setting this value to true will ignore messages originating from a message bus, but would include messages injected into an application.

This is currently an experimental feature that is still in incubation. It may be changed or removed in future releases.

Returns:
The event handler is only for locally sourced events.
Default:
false


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.