Package org.axonframework.queryhandling
Interface QueryResponseMessage<T>
- Type Parameters:
T- The type of object resulting from the query
- All Superinterfaces:
Message<T>,ResultMessage<T>,Serializable
- All Known Implementing Classes:
ConvertingResponseMessage,GenericQueryResponseMessage,GrpcBackedResponseMessage
Message that contains the results of a Query. Results are represented as a Collection of result objects. When a query
resulted in a single result object, that object is contained as the sole element of the collection.
- Since:
- 3.2
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionandMetaData(Map<String, ?> additionalMetaData) Returns a copy of this QueryResponseMessage with its MetaData merged with givenmetaData.withMetaData(Map<String, ?> metaData) Returns a copy of this QueryResponseMessage with the givenmetaData.Methods inherited from interface org.axonframework.messaging.Message
getIdentifier, getMetaData, getPayload, getPayloadType, serializeMetaDataMethods inherited from interface org.axonframework.messaging.ResultMessage
exceptionDetails, exceptionResult, isExceptional, optionalExceptionResult, serializeExceptionResult, serializePayload
-
Method Details
-
withMetaData
Returns a copy of this QueryResponseMessage with the givenmetaData. The payload remains unchanged.- Specified by:
withMetaDatain interfaceMessage<T>- Specified by:
withMetaDatain interfaceResultMessage<T>- Parameters:
metaData- The new MetaData for the QueryResponseMessage- Returns:
- a copy of this message with the given MetaData
-
andMetaData
Returns a copy of this QueryResponseMessage with its MetaData merged with givenmetaData. The payload remains unchanged.- Specified by:
andMetaDatain interfaceMessage<T>- Specified by:
andMetaDatain interfaceResultMessage<T>- Parameters:
additionalMetaData- The MetaData to merge into the QueryResponseMessage- Returns:
- a copy of this message with the given additional MetaData
-