@Retention(RUNTIME)
public @interface Order
Annotation to configure an explicit "order" for method handlers.
This annotation exposes the Vert.x Route.order(int) API as an
an alternative way to force handler order, if you don't like
to write lambda handler fields, or handler reference fields.
Note that because Vert.x-web internally sets an incrementing (0-based) order for handlers
set up without an explicit order specified, mixing handlers with @Order
and without can lead to undesired results. One strategy to mitigate this is to use
the @Order annotation only with very large numbers (1000 and above) to make
sure explicitly ordered handlers are executed after all implicitly ordered handlers,
or to set negative numbers to make sure explicitly ordered handlers are executed before
all implicitly ordered handlers.
- Author:
- odeda
- See Also:
- Vert.x-web ordering documentation