Class ReplyMessage
java.lang.Object
org.axonframework.commandhandling.distributed.ReplyMessage
- All Implemented Interfaces:
Serializable
Base class for reply messages which may be used in the
CommandBusConnector for replying on received
commands from other nodes.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor required for de-/serialization of extending classes.ReplyMessage(String commandIdentifier, CommandResultMessage<?> commandResultMessage, Serializer serializer) Initializes a ReplyMessage containing a reply to the command with given {commandIdentifier} and givencommandResultMessage. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the identifier of the command for which this message is a reply.getCommandResultMessage(Serializer serializer) Returns aCommandResultMessagecontaining the result of command processing.Returns the exception revision of the serialized reply message.Returns the exception type of the serialized reply message.Returns the payload revision of the serialized reply message.Returns the payload type of the serialized reply message.byte[]Returns the serialized exception of the serialized reply message.byte[]Returns the serialized meta data of the serialized reply message.byte[]Returns the serialized payload of the serialized reply message.inthashCode()toString()
-
Field Details
-
commandIdentifier
-
serializedMetaData
protected byte[] serializedMetaData -
payloadType
-
payloadRevision
-
serializedPayload
protected byte[] serializedPayload -
exceptionType
-
exceptionRevision
-
serializedException
protected byte[] serializedException
-
-
Constructor Details
-
ReplyMessage
protected ReplyMessage()Default constructor required for de-/serialization of extending classes. Do not use directly. -
ReplyMessage
public ReplyMessage(String commandIdentifier, CommandResultMessage<?> commandResultMessage, Serializer serializer) Initializes a ReplyMessage containing a reply to the command with given {commandIdentifier} and givencommandResultMessage.- Parameters:
commandIdentifier- the identifier of the command to which the message is a replycommandResultMessage- the result message of command processserializer- the serializer to serialize the message contents with
-
-
Method Details
-
getCommandResultMessage
Returns aCommandResultMessagecontaining the result of command processing.- Parameters:
serializer- the serializer to deserialize the result with- Returns:
- a
CommandResultMessagecontaining the return value of command processing
-
getCommandIdentifier
Returns the identifier of the command for which this message is a reply.- Returns:
- the identifier of the command for which this message is a reply as a
String
-
getPayloadType
Returns the payload type of the serialized reply message.- Returns:
- the payload type of the serialized reply message as a
String
-
getPayloadRevision
Returns the payload revision of the serialized reply message.- Returns:
- the payload revision of the serialized reply message as a
String
-
getSerializedPayload
public byte[] getSerializedPayload()Returns the serialized payload of the serialized reply message.- Returns:
- the serialized payload of the serialized reply message as a
byte[]
-
getExceptionType
Returns the exception type of the serialized reply message.- Returns:
- the exception type of the serialized reply message as a
String
-
getExceptionRevision
Returns the exception revision of the serialized reply message.- Returns:
- the exception revision of the serialized reply message as a
String
-
getSerializedException
public byte[] getSerializedException()Returns the serialized exception of the serialized reply message.- Returns:
- the serialized exception of the serialized reply message as
byte[]
-
getSerializedMetaData
public byte[] getSerializedMetaData()Returns the serialized meta data of the serialized reply message.- Returns:
- the serialized meta data of the serialized reply message as a
byte[]
-
hashCode
public int hashCode() -
equals
-
toString
-