java.lang.Object
io.fluxzero.sdk.modeling.DefaultEntityHelper.MessageWithEntity
- All Implemented Interfaces:
io.fluxzero.common.api.HasMetadata,HasMessage,HasEntity
- Enclosing class:
DefaultEntityHelper
protected static class DefaultEntityHelper.MessageWithEntity
extends Object
implements HasMessage, HasEntity
Wraps a message and its corresponding entity for use in interception or handler invocation.
-
Field Summary
Fields inherited from interface io.fluxzero.sdk.common.HasMessage
warnedAboutMissingPropertyFields inherited from interface io.fluxzero.common.api.HasMetadata
FINAL_CHUNK -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.fluxzero.common.api.Metadata<R> RRetrieves the message payload, deserializing if necessary, cast to the expected type.Returns the underlyingMessagerepresentation of this object.withEntity(Entity<?> entity) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.fluxzero.sdk.common.HasMessage
computeRoutingKey, getMessageId, getPayloadAs, getPayloadClass, getRoutingKey, getRoutingKey, getTimestampMethods inherited from interface io.fluxzero.common.api.HasMetadata
chunked, lastChunk
-
Constructor Details
-
MessageWithEntity
-
-
Method Details
-
withEntity
-
getMetadata
public io.fluxzero.common.api.Metadata getMetadata()- Specified by:
getMetadatain interfaceio.fluxzero.common.api.HasMetadata
-
toMessage
Description copied from interface:HasMessageReturns the underlyingMessagerepresentation of this object.- Specified by:
toMessagein interfaceHasMessage- Returns:
- the
Messagebacking this instance
-
getPayload
public <R> R getPayload()Description copied from interface:HasMessageRetrieves the message payload, deserializing if necessary, cast to the expected type.By default, this delegates to
toMessage().getPayload().- Specified by:
getPayloadin interfaceHasMessage- Type Parameters:
R- the expected payload type- Returns:
- the deserialized payload
-