Interface CommandHandlingMember<T>
- Type Parameters:
T- The type of entity to which the message handler will delegate the actual handling of the command.
- All Superinterfaces:
MessageHandlingMember<T>
Interface describing a message handler capable of handling a specific command.
- Since:
- 3.0.0
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the command that can be handled.booleanCheck if this message handler creates a new instance of the entity of typeTto handle this command.Returns the property of the command that is to be used as routing key towards this command handler instance.Methods inherited from interface org.axonframework.messaging.core.annotation.MessageHandlingMember
attribute, canHandle, canHandleMessageType, canHandleType, declaringClass, handle, handleSync, payloadType, priority, signature, unwrap
-
Method Details
-
commandName
String commandName()Returns the name of the command that can be handled.Might be an empty
Stringwhen undefined by this handling member, in which case components gatheringCommandHandlingMembersshould fall back to other mechanisms to define the name of a handling member.- Returns:
- The name of the command that can be handled.
-
routingKey
String routingKey()Returns the property of the command that is to be used as routing key towards this command handler instance. If multiple handlers instances are available, a sending component is responsible to route commands with the same routing key value to the correct instance.- Returns:
- The property of the command to use as routing key.
-
isFactoryHandler
boolean isFactoryHandler()Check if this message handler creates a new instance of the entity of typeTto handle this command.This is for instance the case if the message is handled in the constructor method of the entity.
- Returns:
trueif this handler is also factory for entities,falseotherwise.
-