public class GrpcBackedQueryMessage<Q,R> extends Object implements QueryMessage<Q,R>
Constructor and Description |
---|
GrpcBackedQueryMessage(QueryRequest query,
Serializer messageSerializer,
LazyDeserializingObject<Q> serializedPayload,
LazyDeserializingObject<ResponseType<R>> serializedResponseType,
Supplier<MetaData> metadata) |
GrpcBackedQueryMessage(QueryRequest query,
Serializer messageSerializer,
Serializer genericSerializer) |
Modifier and Type | Method and Description |
---|---|
QueryMessage<Q,R> |
andMetaData(Map<String,?> metaData)
Returns a copy of this QueryMessage with its MetaData merged with given
metaData . |
String |
getIdentifier()
Returns the identifier of this message.
|
MetaData |
getMetaData()
Returns the meta data for this event.
|
Q |
getPayload()
Returns the payload of this Event.
|
Class<Q> |
getPayloadType()
Returns the type of the payload.
|
String |
getQueryName()
Returns the name identifying the query to be executed.
|
ResponseType<R> |
getResponseType()
The type of response expected by the sender of the query
|
QueryMessage<Q,R> |
withMetaData(Map<String,?> metaData)
Returns a copy of this QueryMessage with the given
metaData . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
serializeMetaData, serializePayload
public GrpcBackedQueryMessage(QueryRequest query, Serializer messageSerializer, Serializer genericSerializer)
public GrpcBackedQueryMessage(QueryRequest query, Serializer messageSerializer, LazyDeserializingObject<Q> serializedPayload, LazyDeserializingObject<ResponseType<R>> serializedResponseType, Supplier<MetaData> metadata)
public String getQueryName()
QueryMessage
getQueryName
in interface QueryMessage<Q,R>
public ResponseType<R> getResponseType()
QueryMessage
getResponseType
in interface QueryMessage<Q,R>
public String getIdentifier()
Message
getIdentifier
in interface Message<Q>
public MetaData getMetaData()
Message
getMetaData
in interface Message<Q>
public Q getPayload()
Message
getPayload
in interface Message<Q>
public Class<Q> getPayloadType()
Message
getPayload().getClass()
, but allows implementations to optimize by using
lazy loading or deserialization.getPayloadType
in interface Message<Q>
public QueryMessage<Q,R> withMetaData(Map<String,?> metaData)
QueryMessage
metaData
. The payload remains unchanged.withMetaData
in interface Message<Q>
withMetaData
in interface QueryMessage<Q,R>
metaData
- The new MetaData for the QueryMessagepublic QueryMessage<Q,R> andMetaData(Map<String,?> metaData)
QueryMessage
metaData
. The payload
remains unchanged.andMetaData
in interface Message<Q>
andMetaData
in interface QueryMessage<Q,R>
metaData
- The MetaData to merge into the QueryMessageCopyright © 2010–2018. All rights reserved.