Command Routing
A routing schema used by a CommandDispatcher for delivering a command to its handler.
A routing schema consists of a default route and custom routes per command class. When finding a command target, the CommandRouting
will see if there is a custom route set for the type of the command. If not found, the default route will be applied.
Parameters
<I>
the type of the entity IDs of this repository
Functions
Link copied to clipboard
Obtains the default route used by the schema.
Link copied to clipboard
Creates a new command routing.
Link copied to clipboard
Sets new default route in the schema.
Link copied to clipboard
public CommandRouting<I> route<M extends CommandMessage>(Class<M> commandType, CommandRoute<I, M> via)
Sets a custom route for the passed command type.