Package org.axonframework.queryhandling
Interface SubscriptionQueryMessage<Q,I,U>
- Type Parameters:
Q- the type of payloadI- the type of initial responseU- the type of incremental responses
- All Superinterfaces:
Message<Q>,QueryMessage<Q,,I> Serializable
- All Known Implementing Classes:
GenericSubscriptionQueryMessage,GrpcBackedSubscriptionQueryMessage
Message type that carries a Subscription Query: a request for information. Besides a payload, Subscription Query
Messages also carry the expected response type and update type. The response type is the type of result expected by
the caller. The update type is type of incremental updates.
Handlers should only answer a query if they can respond with the appropriate response type and update type.
- Since:
- 3.3
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionandMetaData(Map<String, ?> additionalMetaData) Returns a copy of this SubscriptionQueryMessage with its MetaData merged with givenmetaData.Returns the type of incremental responses.withMetaData(Map<String, ?> metaData) Returns a copy of this SubscriptionQueryMessage with the givenmetaData.Methods inherited from interface org.axonframework.messaging.Message
getIdentifier, getMetaData, getPayload, getPayloadType, serializeMetaData, serializePayloadMethods inherited from interface org.axonframework.queryhandling.QueryMessage
getQueryName, getResponseType
-
Method Details
-
getUpdateResponseType
ResponseType<U> getUpdateResponseType()Returns the type of incremental responses.- Returns:
- the type of incremental responses
-
withMetaData
Returns a copy of this SubscriptionQueryMessage with the givenmetaData. The payload remains unchanged.- Specified by:
withMetaDatain interfaceMessage<Q>- Specified by:
withMetaDatain interfaceQueryMessage<Q,I> - Parameters:
metaData- The new MetaData for the SubscriptionQueryMessage- Returns:
- a copy of this message with the given MetaData
-
andMetaData
Returns a copy of this SubscriptionQueryMessage with its MetaData merged with givenmetaData. The payload remains unchanged.- Specified by:
andMetaDatain interfaceMessage<Q>- Specified by:
andMetaDatain interfaceQueryMessage<Q,I> - Parameters:
additionalMetaData- The MetaData to merge into the SubscriptionQueryMessage- Returns:
- a copy of this message with the given additional MetaData
-