Q
- The type of payload expressing the query in this messageI
- The type of initial response expected from this queryU
- The type of incremental updates expected from this querypublic class GenericSubscriptionQueryMessage<Q,I,U> extends GenericQueryMessage<Q,I> implements SubscriptionQueryMessage<Q,I,U>
SubscriptionQueryMessage
. Unless explicitly provided, it assumes the queryName
of the message is the fully qualified class name of the message's payload.Constructor and Description |
---|
GenericSubscriptionQueryMessage(Message<Q> delegate,
String queryName,
ResponseType<I> responseType,
ResponseType<U> updateResponseType)
Initializes the message, using given
delegate as the carrier of payload and metadata and given queryName , expected responseType and expected updateResponseType . |
GenericSubscriptionQueryMessage(Q payload,
ResponseType<I> responseType,
ResponseType<U> updateResponseType)
Initializes the message with the given
payload , expected responseType and expected updateResponseType . |
GenericSubscriptionQueryMessage(Q payload,
String queryName,
ResponseType<I> responseType,
ResponseType<U> updateResponseType)
Initializes the message with the given
payload , queryName , expected responseType and
expected updateResponseType . |
Modifier and Type | Method and Description |
---|---|
GenericSubscriptionQueryMessage<Q,I,U> |
andMetaData(Map<String,?> metaData)
Returns a copy of this QueryMessage with its MetaData merged with given
metaData . |
ResponseType<U> |
getUpdateResponseType()
Returns the type of incremental responses.
|
GenericSubscriptionQueryMessage<Q,I,U> |
withMetaData(Map<String,?> metaData)
Returns a copy of this QueryMessage with the given
metaData . |
describeTo, describeType, getQueryName, getResponseType
getDelegate, getIdentifier, getMetaData, getPayload, getPayloadType, serializeMetaData, serializePayload, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getQueryName, getResponseType, queryName
getIdentifier, getMetaData, getPayload, getPayloadType, serializeMetaData, serializePayload
public GenericSubscriptionQueryMessage(Q payload, ResponseType<I> responseType, ResponseType<U> updateResponseType)
payload
, expected responseType
and expected updateResponseType
. The query name is set to the fully qualified class name of the payload
.payload
- The payload expressing the queryresponseType
- The expected response typeupdateResponseType
- The expected type of incremental updatespublic GenericSubscriptionQueryMessage(Q payload, String queryName, ResponseType<I> responseType, ResponseType<U> updateResponseType)
payload
, queryName
, expected responseType
and
expected updateResponseType
.payload
- The payload expressing the queryqueryName
- The name identifying the query to executeresponseType
- The expected response typeupdateResponseType
- The expected type of incremental updatespublic GenericSubscriptionQueryMessage(Message<Q> delegate, String queryName, ResponseType<I> responseType, ResponseType<U> updateResponseType)
delegate
as the carrier of payload and metadata and given queryName
, expected responseType
and expected updateResponseType
.delegate
- The message containing the payload and meta data for this messagequeryName
- The name identifying the query to executeresponseType
- The expected response typeupdateResponseType
- The expected type of incremental updatespublic ResponseType<U> getUpdateResponseType()
SubscriptionQueryMessage
getUpdateResponseType
in interface SubscriptionQueryMessage<Q,I,U>
public GenericSubscriptionQueryMessage<Q,I,U> withMetaData(@Nonnull Map<String,?> metaData)
QueryMessage
metaData
. The payload remains unchanged.withMetaData
in interface Message<Q>
withMetaData
in interface QueryMessage<Q,I>
withMetaData
in interface SubscriptionQueryMessage<Q,I,U>
withMetaData
in class GenericQueryMessage<Q,I>
metaData
- The new MetaData for the QueryMessagepublic GenericSubscriptionQueryMessage<Q,I,U> andMetaData(@Nonnull Map<String,?> metaData)
QueryMessage
metaData
. The payload remains
unchanged.andMetaData
in interface Message<Q>
andMetaData
in interface QueryMessage<Q,I>
andMetaData
in interface SubscriptionQueryMessage<Q,I,U>
andMetaData
in class GenericQueryMessage<Q,I>
metaData
- The MetaData to merge into the QueryMessageCopyright © 2010–2023. All rights reserved.