public class SubscriptionMessageSerializer extends Object
SubscriptionQueryMessage
, the initial QueryResponseMessage
and the
subsequent SubscriptionQueryUpdateMessage
's and Axon Server gRPC SubscriptionQuery
and SubscriptionQueryResponse
. The latter is serviced by providing a QueryProviderOutbound
wrapping the
SubscriptionQueryResponse.Constructor and Description |
---|
SubscriptionMessageSerializer(Serializer messageSerializer,
Serializer serializer,
AxonServerConfiguration configuration)
Instantiate a serializer used to convert Axon
SubscriptionQueryMessage s, the initial QueryResponseMessage and the subsequent SubscriptionQueryUpdateMessage s into Axon Server gRPC messages
and vice versa. |
Modifier and Type | Method and Description |
---|---|
<I> QueryResponseMessage<I> |
deserialize(io.axoniq.axonserver.grpc.query.QueryResponse queryResponse)
Deserializes the given
queryResponse into a QueryResponseMessage . |
<U> SubscriptionQueryUpdateMessage<U> |
deserialize(io.axoniq.axonserver.grpc.query.QueryUpdate queryUpdate)
Deserializes the given
queryUpdate into a SubscriptionQueryUpdateMessage . |
<Q,I,U> SubscriptionQueryMessage<Q,I,U> |
deserialize(io.axoniq.axonserver.grpc.query.SubscriptionQuery subscriptionQuery)
Deserializes the given
subscriptionQuery into a SubscriptionQueryMessage . |
io.axoniq.axonserver.grpc.query.SubscriptionQuery |
serialize(SubscriptionQueryMessage<?,?,?> subscriptionQueryMessage)
Deprecated.
in through use of the AxonServer java
connector
|
io.axoniq.axonserver.grpc.query.QueryUpdate |
serialize(SubscriptionQueryUpdateMessage<?> subscriptionQueryUpdateMessage)
Serializes the given
subscriptionQueryUpdateMessage into a QueryUpdate . |
io.axoniq.axonserver.grpc.query.QueryRequest |
serializeQuery(SubscriptionQueryMessage subscriptionQueryMessage)
Serializes the given
subscriptionQueryMessage into a QueryRequest . |
io.axoniq.axonserver.grpc.SerializedObject |
serializeUpdateType(SubscriptionQueryMessage<?,?,?> subscriptionQueryMessage)
Serializes the given
subscriptionQueryMessage into a SerializedObject . |
public SubscriptionMessageSerializer(Serializer messageSerializer, Serializer serializer, AxonServerConfiguration configuration)
SubscriptionQueryMessage
s, the initial QueryResponseMessage
and the subsequent SubscriptionQueryUpdateMessage
s into Axon Server gRPC messages
and vice versa.messageSerializer
- a Serializer
used to de-/serialize an Axon Server gRPC message into SubscriptionQueryMessage
s, QueryResponseMessage
s and SubscriptionQueryUpdateMessage
s, and vice versaserializer
- a Serializer
used to create a dedicated converter for a QueryMessage
ResponseType
configuration
- an AxonServerConfiguration
used to set the configurable component id and name in
the messagespublic io.axoniq.axonserver.grpc.query.QueryRequest serializeQuery(SubscriptionQueryMessage subscriptionQueryMessage)
subscriptionQueryMessage
into a QueryRequest
.subscriptionQueryMessage
- the SubscriptionQueryMessage
to serialize into a QueryRequest
QueryRequest
based on the given subscriptionQueryMessage
public io.axoniq.axonserver.grpc.SerializedObject serializeUpdateType(SubscriptionQueryMessage<?,?,?> subscriptionQueryMessage)
subscriptionQueryMessage
into a SerializedObject
.subscriptionQueryMessage
- the SubscriptionQueryMessage
who's SubscriptionQueryMessage.getUpdateResponseType()
to serialize into a SerializedObject
SerializedObject
based on the given subscriptionQueryMessage
its SubscriptionQueryMessage.getUpdateResponseType()
public io.axoniq.axonserver.grpc.query.QueryUpdate serialize(SubscriptionQueryUpdateMessage<?> subscriptionQueryUpdateMessage)
subscriptionQueryUpdateMessage
into a QueryUpdate
.subscriptionQueryUpdateMessage
- the SubscriptionQueryUpdateMessage
to serialize into a QueryUpdate
QueryUpdate
based on the given SubscriptionQueryUpdateMessage
public <Q,I,U> SubscriptionQueryMessage<Q,I,U> deserialize(io.axoniq.axonserver.grpc.query.SubscriptionQuery subscriptionQuery)
subscriptionQuery
into a SubscriptionQueryMessage
.Q
- the query type of the SubscriptionQueryMessage
to returnI
- the initial result type of the SubscriptionQueryMessage
to returnU
- the update type of the SubscriptionQueryMessage
to returnsubscriptionQuery
- the SubscriptionQuery
to deserialize into a SubscriptionQueryMessage
SubscriptionQueryMessage
based on the given subscriptionQuery
public <I> QueryResponseMessage<I> deserialize(io.axoniq.axonserver.grpc.query.QueryResponse queryResponse)
queryResponse
into a QueryResponseMessage
. Typically used for the initial
result of the subscription query.I
- the response type of the QueryResponseMessage
to returnqueryResponse
- the QueryResponse
to deserialize into a QueryResponseMessage
QueryResponseMessage
based on the given QueryResponse
public <U> SubscriptionQueryUpdateMessage<U> deserialize(io.axoniq.axonserver.grpc.query.QueryUpdate queryUpdate)
queryUpdate
into a SubscriptionQueryUpdateMessage
.U
- the update type of the SubscriptionQueryUpdateMessage
to returnqueryUpdate
- the QueryUpdate
to deserialize into a SubscriptionQueryUpdateMessage
SubscriptionQueryUpdateMessage
based on the given QueryUpdate
@Deprecated public io.axoniq.axonserver.grpc.query.SubscriptionQuery serialize(SubscriptionQueryMessage<?,?,?> subscriptionQueryMessage)
SubscriptionQueryMessage
into a SubscriptionQuery
.subscriptionQueryMessage
- the SubscriptionQueryMessage
to convert into a SubscriptionQuery
SubscriptionQuery
based on the provided subscriptionQueryMessage
Copyright © 2010–2024. All rights reserved.