Package org.axonframework.lifecycle
Annotation Interface StartHandler
@Documented
@Retention(RUNTIME)
@Target({ANNOTATION_TYPE,METHOD})
@HasHandlerAttributes
public @interface StartHandler
Annotation indicating that a member method should be a part of the start cycle of an Axon application. The operation
can be made asynchronous by defining a return type of
CompletableFuture on the annotated
method.
The phase() defines the moment the member method should be invoked. The lower the provided phase,
the earlier this method will be executed during start up.
This annotation is only allowed on methods and as a meta-annotation.
- Since:
- 4.3
- Author:
- Steven van Beelen
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionintAnintdefining the moment in the start cycle the member method should be invoked.
-
Element Details
-
phase
int phaseAnintdefining the moment in the start cycle the member method should be invoked. The lower the providedphase, the earlier this method will be executed during start up. ThePhaseconstants can be used to this end.- Returns:
- the
intdefining the moment in the start cycle the member method should be invoked
-