Package io.mats3.spring
Annotation Interface MatsClassMapping.Stage
 Enclosing class:
 MatsClassMapping
@Target({METHOD,ANNOTATION_TYPE})
@Retention(RUNTIME)
@Documented
public static @interface MatsClassMapping.Stage
Each method in the class that shall correspond to a Stage on the Mats endpoint must be annotated with this
@Stage
annotation. An ordinal
must be assigned to each stage, so that Mats knows
which order the stages are in  read more about the ordinal number at ordinal()
. The initial stage must
have the ordinal zero, which also shall be the first stage in the resulting sorted list of Stages (i.e. negative
values are not allowed)  this is the Stage which gets incoming messages targeted at the
endpointId
of this endpoint.
Optional Element Summary
Modifier and TypeOptional ElementDescriptionint
The ordinal of this Stage in the sequence of stages of this endpoint  that is, an integer that expresses the relative position of this Stage wrt.int
Alias for "ordinal", so that if you only need to set the ordinal (which relative position in the sequence of stages this Stage is), you can do so directly:@Stage(15)
. 
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Constant for 0 (zero), the initial Stage's ordinal.

Field Details

INITIAL
static final int INITIALConstant for 0 (zero), the initial Stage's ordinal. See Also:


Element Details

ordinal
@AliasFor("value") int ordinalThe ordinal of this Stage in the sequence of stages of this endpoint  that is, an integer that expresses the relative position of this Stage wrt. to the other stages. The initial Stage must have the ordinal zero, you may use the constantINITIAL
. The magnitude of the number does not matter, only the "sort order", so 0, 1, 2 is just as good as 0, 3, 5, which is just as good as 0, 4527890, 4527990  although one can definitely discuss the relative merits between each approach. An idea is the cool'n'retro Commodore BASICstyle of line numbers, which commonly was to use values in multiple of 10, i.e. 0 (for the Initial), then 10, 20, 30. The rationale is that you then quickly can add a line between 10 and 20 by sticking in a 15 there. Returns:
 the ordinal of this Stage in the sequence of stages of this endpoint.
 Default:
 1

value
@AliasFor("ordinal") int valueAlias for "ordinal", so that if you only need to set the ordinal (which relative position in the sequence of stages this Stage is), you can do so directly:@Stage(15)
. Returns:
 the ordinal of this Stage in the sequence of stages of this endpoint.
 See Also:
 Default:
 1
