Package org.axonframework.queryhandling
Class GenericStreamingQueryMessage<Q,R>
java.lang.Object
org.axonframework.messaging.MessageDecorator<Q>
org.axonframework.queryhandling.GenericQueryMessage<Q,org.reactivestreams.Publisher<R>>
org.axonframework.queryhandling.GenericStreamingQueryMessage<Q,R>
- Type Parameters:
Q- the type of streaming query payloadR- the type of the result streamed viaFlux
- All Implemented Interfaces:
Serializable,Message<Q>,QueryMessage<Q,,org.reactivestreams.Publisher<R>> StreamingQueryMessage<Q,R>
public class GenericStreamingQueryMessage<Q,R>
extends GenericQueryMessage<Q,org.reactivestreams.Publisher<R>>
implements StreamingQueryMessage<Q,R>
Generic implementation of the
StreamingQueryMessage.- Since:
- 4.6.0
- Author:
- Milan Savic, Stefan Dragisic
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes the message with the givendelegate,queryNameand expectedresponseType.GenericStreamingQueryMessage(Message<Q> delegate, String queryName, ResponseType<org.reactivestreams.Publisher<R>> responseType) Initialize the Query Message, using givendelegateas the carrier of payload and metadata and givenqueryNameand expecting the givenresponseType.GenericStreamingQueryMessage(Q payload, Class<R> responseType) Initializes the message with the givenpayloadand expectedresponseType.GenericStreamingQueryMessage(Q payload, String queryName, Class<R> responseType) Initializes the message with the givenpayload,queryNameand expectedresponseType.GenericStreamingQueryMessage(Q payload, String queryName, ResponseType<org.reactivestreams.Publisher<R>> responseType) Initializes the message with the givenpayload,queryNameand expectedresponseType.GenericStreamingQueryMessage(Q payload, ResponseType<org.reactivestreams.Publisher<R>> responseType) Initializes the message with the givenpayloadand expectedresponseType. -
Method Summary
Modifier and TypeMethodDescriptionandMetaData(Map<String, ?> metaData) Returns a copy of this QueryMessage with its MetaData merged with givenmetaData.protected StringDescribe the type of message, used inMessageDecorator.toString().withMetaData(Map<String, ?> metaData) Returns a copy of this QueryMessage with the givenmetaData.Methods inherited from class org.axonframework.queryhandling.GenericQueryMessage
describeTo, getQueryName, getResponseTypeMethods inherited from class org.axonframework.messaging.MessageDecorator
getDelegate, getIdentifier, getMetaData, getPayload, getPayloadType, serializeMetaData, serializePayload, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.axonframework.messaging.Message
getIdentifier, getMetaData, getPayload, getPayloadType, serializeMetaData, serializePayloadMethods inherited from interface org.axonframework.queryhandling.QueryMessage
getQueryNameMethods inherited from interface org.axonframework.queryhandling.StreamingQueryMessage
getResponseType
-
Constructor Details
-
GenericStreamingQueryMessage
Initializes the message with the givenpayloadand expectedresponseType. The query name is set to the fully qualified class name of thepayload.- Parameters:
payload- The payload expressing the queryresponseType- The expected response type
-
GenericStreamingQueryMessage
Initializes the message with the givenpayload,queryNameand expectedresponseType.- Parameters:
payload- The payload expressing the queryqueryName- The name identifying the query to executeresponseType- The expected response type
-
GenericStreamingQueryMessage
public GenericStreamingQueryMessage(Q payload, ResponseType<org.reactivestreams.Publisher<R>> responseType) Initializes the message with the givenpayloadand expectedresponseType. The query name is set to the fully qualified class name of thepayload.- Parameters:
payload- The payload expressing the queryresponseType- The expected response type
-
GenericStreamingQueryMessage
public GenericStreamingQueryMessage(Q payload, String queryName, ResponseType<org.reactivestreams.Publisher<R>> responseType) Initializes the message with the givenpayload,queryNameand expectedresponseType.- Parameters:
payload- The payload expressing the queryqueryName- The name identifying the query to executeresponseType- The expected response type
-
GenericStreamingQueryMessage
Initializes the message with the givendelegate,queryNameand expectedresponseType.- Parameters:
delegate- The message containing the payload and meta-data for this messagequeryName- The name identifying the query to executeresponseType- The expected response type
-
GenericStreamingQueryMessage
public GenericStreamingQueryMessage(Message<Q> delegate, String queryName, ResponseType<org.reactivestreams.Publisher<R>> responseType) Initialize the Query Message, using givendelegateas the carrier of payload and metadata and givenqueryNameand expecting the givenresponseType.- Parameters:
delegate- The message containing the payload and meta-data for this messagequeryName- The name identifying the query to executeresponseType- The expected response type
-
-
Method Details
-
withMetaData
Description copied from interface:QueryMessageReturns a copy of this QueryMessage with the givenmetaData. The payload remains unchanged.- Specified by:
withMetaDatain interfaceMessage<Q>- Specified by:
withMetaDatain interfaceQueryMessage<Q,R> - Specified by:
withMetaDatain interfaceStreamingQueryMessage<Q,R> - Overrides:
withMetaDatain classGenericQueryMessage<Q,org.reactivestreams.Publisher<R>> - Parameters:
metaData- The new MetaData for the QueryMessage- Returns:
- a copy of this message with the given MetaData
-
andMetaData
Description copied from interface:QueryMessageReturns a copy of this QueryMessage with its MetaData merged with givenmetaData. The payload remains unchanged.- Specified by:
andMetaDatain interfaceMessage<Q>- Specified by:
andMetaDatain interfaceQueryMessage<Q,R> - Specified by:
andMetaDatain interfaceStreamingQueryMessage<Q,R> - Overrides:
andMetaDatain classGenericQueryMessage<Q,org.reactivestreams.Publisher<R>> - Parameters:
metaData- The MetaData to merge into the QueryMessage- Returns:
- a copy of this message with the given additional MetaData
-
describeType
Description copied from class:MessageDecoratorDescribe the type of message, used inMessageDecorator.toString().Defaults to the simple class name of the actual instance.
- Overrides:
describeTypein classGenericQueryMessage<Q,org.reactivestreams.Publisher<R>> - Returns:
- the type of message
-