Class GrpcBackedSubscriptionQueryMessage<Q,I,U>
java.lang.Object
org.axonframework.axonserver.connector.query.subscription.GrpcBackedSubscriptionQueryMessage<Q,I,U>
- Type Parameters:
Q- a generic specifying the type of theSubscriptionQueryMessage's payloadI- a generic specifying the type of the initial result of theSubscriptionQueryResultU- a generic specifying the type of the subsequent updates of theSubscriptionQueryResult
- All Implemented Interfaces:
Serializable,Message<Q>,QueryMessage<Q,,I> SubscriptionQueryMessage<Q,I, U>
public class GrpcBackedSubscriptionQueryMessage<Q,I,U>
extends Object
implements SubscriptionQueryMessage<Q,I,U>
Wrapper that allows clients to access a gRPC
SubscriptionQuery message as a
SubscriptionQueryMessage.- Since:
- 4.0
- Author:
- Sara Pellegrini
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGrpcBackedSubscriptionQueryMessage(io.axoniq.axonserver.grpc.query.SubscriptionQuery subscriptionQuery, Serializer messageSerializer, Serializer serializer) Instantiate aGrpcBackedSubscriptionQueryMessagewith the givensubscriptionQuery, using the providedmessageSerializerto be able to retrieve the payload andMetaDatafrom it. -
Method Summary
Modifier and TypeMethodDescriptionandMetaData(Map<String, ?> metaData) Returns a copy of this SubscriptionQueryMessage with its MetaData merged with givenmetaData.Returns the identifier of this message.Returns the meta data for this message.Returns the payload of this message.Returns the type of the payload.Returns the name identifying the query to be executed.The type of response expected by the sender of the queryReturns the type of incremental responses.withMetaData(Map<String, ?> metaData) Returns a copy of this SubscriptionQueryMessage with the givenmetaData.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.messaging.Message
serializeMetaData, serializePayload
-
Constructor Details
-
GrpcBackedSubscriptionQueryMessage
public GrpcBackedSubscriptionQueryMessage(io.axoniq.axonserver.grpc.query.SubscriptionQuery subscriptionQuery, Serializer messageSerializer, Serializer serializer) Instantiate aGrpcBackedSubscriptionQueryMessagewith the givensubscriptionQuery, using the providedmessageSerializerto be able to retrieve the payload andMetaDatafrom it. Theserializeris solely used to deserialize the response type of the update message.- Parameters:
subscriptionQuery- theSubscriptionQuerywhich is being wrapped as aSubscriptionQueryMessagemessageSerializer- theSerializerused to deserialize the payload andMetaDatafrom the givenqueryRequestserializer- theSerializerused to deserialize the response type
-
-
Method Details
-
getUpdateResponseType
Description copied from interface:SubscriptionQueryMessageReturns the type of incremental responses.- Specified by:
getUpdateResponseTypein interfaceSubscriptionQueryMessage<Q,I, U> - Returns:
- the type of incremental responses
-
getQueryName
Description copied from interface:QueryMessageReturns the name identifying the query to be executed.- Specified by:
getQueryNamein interfaceQueryMessage<Q,I> - Returns:
- the name identifying the query to be executed.
-
getResponseType
Description copied from interface:QueryMessageThe type of response expected by the sender of the query- Specified by:
getResponseTypein interfaceQueryMessage<Q,I> - Returns:
- the type of response expected by the sender of the query
-
getIdentifier
Description copied from interface:MessageReturns the identifier of this message. Two messages with the same identifiers should be interpreted as different representations of the same conceptual message. In such case, the meta-data may be different for both representations. The payload may be identical.- Specified by:
getIdentifierin interfaceMessage<Q>- Returns:
- the unique identifier of this message
-
getMetaData
Description copied from interface:MessageReturns the meta data for this message. This meta data is a collection of key-value pairs, where the key is a String, and the value is a serializable object.- Specified by:
getMetaDatain interfaceMessage<Q>- Returns:
- the meta data for this message
-
getPayload
Description copied from interface:MessageReturns the payload of this message. The payload is the application-specific information.- Specified by:
getPayloadin interfaceMessage<Q>- Returns:
- the payload of this message
-
getPayloadType
Description copied from interface:MessageReturns the type of the payload. Is semantically equal togetPayload().getClass(), but allows implementations to optimize by using lazy loading or deserialization.- Specified by:
getPayloadTypein interfaceMessage<Q>- Returns:
- the type of payload.
-
withMetaData
Description copied from interface:SubscriptionQueryMessageReturns a copy of this SubscriptionQueryMessage with the givenmetaData. The payload remains unchanged.- Specified by:
withMetaDatain interfaceMessage<Q>- Specified by:
withMetaDatain interfaceQueryMessage<Q,I> - Specified by:
withMetaDatain interfaceSubscriptionQueryMessage<Q,I, U> - Parameters:
metaData- The new MetaData for the SubscriptionQueryMessage- Returns:
- a copy of this message with the given MetaData
-
andMetaData
Description copied from interface:SubscriptionQueryMessageReturns 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> - Specified by:
andMetaDatain interfaceSubscriptionQueryMessage<Q,I, U> - Parameters:
metaData- The MetaData to merge into the SubscriptionQueryMessage- Returns:
- a copy of this message with the given additional MetaData
-