Q - a generic specifying the type of the SubscriptionQueryMessage's payloadI - a generic specifying the type of the initial result of the SubscriptionQueryResultU - a generic specifying the type of the subsequent updates of the SubscriptionQueryResultpublic class GrpcBackedSubscriptionQueryMessage<Q,I,U> extends Object implements SubscriptionQueryMessage<Q,I,U>
SubscriptionQuery message as a SubscriptionQueryMessage.| Constructor and Description |
|---|
GrpcBackedSubscriptionQueryMessage(io.axoniq.axonserver.grpc.query.SubscriptionQuery subscriptionQuery,
Serializer messageSerializer,
Serializer serializer)
Instantiate a
GrpcBackedSubscriptionQueryMessage with the given subscriptionQuery, using the
provided messageSerializer to be able to retrieve the payload and MetaData from it. |
| Modifier and Type | Method and Description |
|---|---|
GrpcBackedSubscriptionQueryMessage<Q,I,U> |
andMetaData(Map<String,?> metaData)
Returns a copy of this SubscriptionQueryMessage with its MetaData merged with given
metaData. |
String |
getIdentifier()
Returns the identifier of this message.
|
MetaData |
getMetaData()
Returns the meta data for this message.
|
Q |
getPayload()
Returns the payload of this message.
|
Class<Q> |
getPayloadType()
Returns the type of the payload.
|
String |
getQueryName()
Returns the name identifying the query to be executed.
|
ResponseType<I> |
getResponseType()
The type of response expected by the sender of the query
|
ResponseType<U> |
getUpdateResponseType()
Returns the type of incremental responses.
|
GrpcBackedSubscriptionQueryMessage<Q,I,U> |
withMetaData(Map<String,?> metaData)
Returns a copy of this SubscriptionQueryMessage with the given
metaData. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitqueryNameserializeMetaData, serializePayloadpublic GrpcBackedSubscriptionQueryMessage(io.axoniq.axonserver.grpc.query.SubscriptionQuery subscriptionQuery,
Serializer messageSerializer,
Serializer serializer)
GrpcBackedSubscriptionQueryMessage with the given subscriptionQuery, using the
provided messageSerializer to be able to retrieve the payload and MetaData from it. The serializer is solely used to deserialize the response type of the update message.subscriptionQuery - the SubscriptionQuery which is being wrapped as a SubscriptionQueryMessagemessageSerializer - the Serializer used to deserialize the payload and MetaData from the
given queryRequestserializer - the Serializer used to deserialize the response typepublic ResponseType<U> getUpdateResponseType()
SubscriptionQueryMessagegetUpdateResponseType in interface SubscriptionQueryMessage<Q,I,U>@Nonnull public String getQueryName()
QueryMessagegetQueryName in interface QueryMessage<Q,I>@Nonnull public ResponseType<I> getResponseType()
QueryMessagegetResponseType in interface QueryMessage<Q,I>public String getIdentifier()
MessagegetIdentifier in interface Message<Q>public MetaData getMetaData()
MessagegetMetaData in interface Message<Q>public Q getPayload()
MessagegetPayload in interface Message<Q>public Class<Q> getPayloadType()
MessagegetPayload().getClass(), but allows implementations to optimize by using lazy
loading or deserialization.getPayloadType in interface Message<Q>public GrpcBackedSubscriptionQueryMessage<Q,I,U> withMetaData(@Nonnull Map<String,?> metaData)
SubscriptionQueryMessagemetaData. The payload remains unchanged.withMetaData in interface Message<Q>withMetaData in interface QueryMessage<Q,I>withMetaData in interface SubscriptionQueryMessage<Q,I,U>metaData - The new MetaData for the SubscriptionQueryMessagepublic GrpcBackedSubscriptionQueryMessage<Q,I,U> andMetaData(@Nonnull Map<String,?> metaData)
SubscriptionQueryMessagemetaData. The payload
remains unchanged.andMetaData in interface Message<Q>andMetaData in interface QueryMessage<Q,I>andMetaData in interface SubscriptionQueryMessage<Q,I,U>metaData - The MetaData to merge into the SubscriptionQueryMessageCopyright © 2010–2023. All rights reserved.