Class GenericCommandResultMessage<R>

java.lang.Object
org.axonframework.messaging.MessageDecorator<R>
org.axonframework.messaging.GenericResultMessage<R>
org.axonframework.commandhandling.GenericCommandResultMessage<R>
Type Parameters:
R - The type of the payload contained in this Message
All Implemented Interfaces:
Serializable, CommandResultMessage<R>, Message<R>, ResultMessage<R>

public class GenericCommandResultMessage<R> extends GenericResultMessage<R> implements CommandResultMessage<R>
Generic implementation of CommandResultMessage.
Since:
4.0
Author:
Milan Savic
See Also:
  • Constructor Details

    • GenericCommandResultMessage

      public GenericCommandResultMessage(@Nullable R commandResult)
      Creates a Command Result Message with the given commandResult as the payload.
      Parameters:
      commandResult - the payload for the Message
    • GenericCommandResultMessage

      public GenericCommandResultMessage(@Nonnull Throwable exception)
      Creates a Command Result Message with the given exception.
      Parameters:
      exception - the Exception describing the cause of an error
    • GenericCommandResultMessage

      public GenericCommandResultMessage(@Nonnull R commandResult, @Nonnull Map<String,?> metaData)
      Creates a Command Result Message with the given commandResult as the payload and metaData as the meta data.
      Parameters:
      commandResult - the payload for the Message
      metaData - the meta data for the Message
    • GenericCommandResultMessage

      public GenericCommandResultMessage(@Nonnull Throwable exception, @Nonnull Map<String,?> metaData)
      Creates a Command Result Message with the given exception and metaData.
      Parameters:
      exception - the Exception describing the cause of an error
      metaData - the meta data for the Message
    • GenericCommandResultMessage

      public GenericCommandResultMessage(@Nonnull Message<R> delegate)
      Creates a new Command Result Message with given delegate message.
      Parameters:
      delegate - the message delegate
    • GenericCommandResultMessage

      public GenericCommandResultMessage(@Nonnull Message<R> delegate, @Nullable Throwable exception)
      Creates a Command Result Message with given delegate message and exception.
      Parameters:
      delegate - the Message delegate
      exception - the Exception describing the cause of an error
  • Method Details