public abstract class DuplicateCommandHandlerResolution extends Object
DuplicateCommandHandlerResolver implementations. Can be used to
configure how a CommandBus should react upon a duplicate subscription of a
command handling function.| Modifier and Type | Method and Description |
|---|---|
static DuplicateCommandHandlerResolver |
logAndOverride()
A
DuplicateCommandHandlerResolver implementation which logs a warning message and resolve to returning
the duplicate handler and overriding the existing command handler. |
static DuplicateCommandHandlerResolver |
rejectDuplicates()
A
DuplicateCommandHandlerResolver implementation which throws a
DuplicateCommandHandlerSubscriptionException. |
static DuplicateCommandHandlerResolver |
silentOverride()
A
DuplicateCommandHandlerResolver implementation that allows handlers to silently override previous
registered handlers for the same command. |
public static DuplicateCommandHandlerResolver logAndOverride()
DuplicateCommandHandlerResolver implementation which logs a warning message and resolve to returning
the duplicate handler and overriding the existing command handler.public static DuplicateCommandHandlerResolver rejectDuplicates()
DuplicateCommandHandlerResolver implementation which throws a
DuplicateCommandHandlerSubscriptionException.public static DuplicateCommandHandlerResolver silentOverride()
DuplicateCommandHandlerResolver implementation that allows handlers to silently override previous
registered handlers for the same command.Copyright © 2010–2023. All rights reserved.