Q
- the type of streaming query payloadR
- the type of the result streamed via Flux
public class GenericStreamingQueryMessage<Q,R> extends GenericQueryMessage<Q,org.reactivestreams.Publisher<R>> implements StreamingQueryMessage<Q,R>
StreamingQueryMessage
.Constructor and Description |
---|
GenericStreamingQueryMessage(Message<Q> delegate,
String queryName,
Class<R> responseType)
Initializes the message with the given
delegate , queryName and expected responseType . |
GenericStreamingQueryMessage(Message<Q> delegate,
String queryName,
ResponseType<org.reactivestreams.Publisher<R>> responseType)
Initialize the Query Message, using given
delegate as the carrier of payload and metadata and given
queryName and expecting the given responseType . |
GenericStreamingQueryMessage(Q payload,
Class<R> responseType)
Initializes the message with the given
payload and expected responseType . |
GenericStreamingQueryMessage(Q payload,
ResponseType<org.reactivestreams.Publisher<R>> responseType)
Initializes the message with the given
payload and expected responseType . |
GenericStreamingQueryMessage(Q payload,
String queryName,
Class<R> responseType)
Initializes the message with the given
payload , queryName and expected responseType . |
GenericStreamingQueryMessage(Q payload,
String queryName,
ResponseType<org.reactivestreams.Publisher<R>> responseType)
Initializes the message with the given
payload , queryName and expected responseType . |
Modifier and Type | Method and Description |
---|---|
StreamingQueryMessage<Q,R> |
andMetaData(Map<String,?> metaData)
Returns a copy of this QueryMessage with its MetaData merged with given
metaData . |
protected String |
describeType()
Describe the type of message, used in
MessageDecorator.toString() . |
StreamingQueryMessage<Q,R> |
withMetaData(Map<String,?> metaData)
Returns a copy of this QueryMessage with the given
metaData . |
describeTo, getQueryName, getResponseType
getDelegate, getIdentifier, getMetaData, getPayload, getPayloadType, serializeMetaData, serializePayload, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getResponseType
getQueryName, queryName
getIdentifier, getMetaData, getPayload, getPayloadType, serializeMetaData, serializePayload
public GenericStreamingQueryMessage(Q payload, Class<R> responseType)
payload
and expected responseType
. The query name is set
to the fully qualified class name of the payload
.payload
- The payload expressing the queryresponseType
- The expected response typepublic GenericStreamingQueryMessage(Q payload, String queryName, Class<R> responseType)
payload
, queryName
and expected responseType
.payload
- The payload expressing the queryqueryName
- The name identifying the query to executeresponseType
- The expected response typepublic GenericStreamingQueryMessage(Q payload, ResponseType<org.reactivestreams.Publisher<R>> responseType)
payload
and expected responseType
. The query name is set
to the fully qualified class name of the payload
.payload
- The payload expressing the queryresponseType
- The expected response typepublic GenericStreamingQueryMessage(Q payload, String queryName, ResponseType<org.reactivestreams.Publisher<R>> responseType)
payload
, queryName
and expected responseType
.payload
- The payload expressing the queryqueryName
- The name identifying the query to executeresponseType
- The expected response typepublic GenericStreamingQueryMessage(Message<Q> delegate, String queryName, Class<R> responseType)
delegate
, queryName
and expected responseType
.delegate
- The message containing the payload and meta-data for this messagequeryName
- The name identifying the query to executeresponseType
- The expected response typepublic GenericStreamingQueryMessage(Message<Q> delegate, String queryName, ResponseType<org.reactivestreams.Publisher<R>> responseType)
delegate
as the carrier of payload and metadata and given
queryName
and expecting the given responseType
.delegate
- The message containing the payload and meta-data for this messagequeryName
- The name identifying the query to executeresponseType
- The expected response typepublic StreamingQueryMessage<Q,R> withMetaData(Map<String,?> metaData)
QueryMessage
metaData
. The payload remains unchanged.withMetaData
in interface Message<Q>
withMetaData
in interface QueryMessage<Q,org.reactivestreams.Publisher<R>>
withMetaData
in interface StreamingQueryMessage<Q,R>
withMetaData
in class GenericQueryMessage<Q,org.reactivestreams.Publisher<R>>
metaData
- The new MetaData for the QueryMessagepublic StreamingQueryMessage<Q,R> andMetaData(Map<String,?> metaData)
QueryMessage
metaData
. The payload remains
unchanged.andMetaData
in interface Message<Q>
andMetaData
in interface QueryMessage<Q,org.reactivestreams.Publisher<R>>
andMetaData
in interface StreamingQueryMessage<Q,R>
andMetaData
in class GenericQueryMessage<Q,org.reactivestreams.Publisher<R>>
metaData
- The MetaData to merge into the QueryMessageprotected String describeType()
MessageDecorator
MessageDecorator.toString()
.
Defaults to the simple class name of the actual instance.
describeType
in class GenericQueryMessage<Q,org.reactivestreams.Publisher<R>>
Copyright © 2010–2024. All rights reserved.