Annotation Interface ShutdownHandler


Annotation indicating that a member method should be a part of the shutdown 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 higher the provided phase, the earlier this method will be executed during shutdown.

This annotation is only allowed on methods and as a meta-annotation.

Since:
4.3
Author:
Steven van Beelen
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    An int defining the moment in the shutdown cycle the member method should be invoked.
  • Element Details

    • phase

      int phase
      An int defining the moment in the shutdown cycle the member method should be invoked. The higher the provided phase, the earlier this method will be executed during shutdown. The Phase constants can be used to this end.
      Returns:
      the int defining the moment in the shutdown cycle the member method should be invoked