Interface CommandMessageHandlingMember<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>
All Known Subinterfaces:
ForwardingCommandMessageHandlingMember<T>
All Known Implementing Classes:
ChildForwardingCommandMessageHandlingMember

public interface CommandMessageHandlingMember<T> extends MessageHandlingMember<T>
Interface describing a message handler capable of handling a specific command.
  • Method Details

    • commandName

      String commandName()
      Returns the name of the command that can be handled.
      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 type T to handle this command.

      This is for instance the case if the message is handled in the constructor method of the entity.

      Returns:
      true if this handler is also factory for entities, false otherwise.