Annotation Interface Command
Allows for specifying the business/domain name() of the command, the version() of the command, and
the command's routing key. The fields are used to map an annotated-command to a
CommandMessage.
- Since:
- 5.0.0
- Author:
- Steven van Beelen
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe business or domain name of the command.The namespace or (bounded) context of the command.The property of the command to be used as a routing key when dispatching the command.The version of the command.
-
Element Details
-
namespace
String namespaceThe namespace or (bounded) context of the command.Is used to define the
QualifiedName.namespace()of a fully qualified name.Defaults to the package name of the annotated class.
- Returns:
- The namespace or (bounded) context of the command.
- Default:
""
-
name
String nameThe business or domain name of the command.Is used to define the
QualifiedName.localName()of a fully qualified name.Defaults to the simple name of the annotated class. Note that when a nested class is annotated, the simple name does not include the names of the enclosing classes.
- Returns:
- The business or domain name of the command.
- Default:
""
-
version
String versionThe version of the command.Will typically be mapped to the
MessageType.version(). Defaults toMessageType.DEFAULT_VERSION.- Returns:
- The version of the command.
- Default:
"0.0.1"
-
routingKey
String routingKeyThe property of the command to be used as a routing key when dispatching the command.The result of invoking the method referring to the given property will be set as the
CommandMessage.routingKey().- Returns:
- The property of the command to use as the routing key.
- Default:
""
-