Module spring.data.mongodb
Interface Message<S,T>
public interface Message<S,T>
General message abstraction for any type of Event / Message published by MongoDB server to the client. This might be
Change Stream Events, or
For convenience the
Documents published by a
tailable cursor. The original message received
is preserved in the raw parameter. Additional information about the origin of the Message is contained in
Message.MessageProperties. For convenience the
getBody() of the message gets lazily converted into the target domain type if necessary
using the mapping infrastructure.- Since:
- 2.1
- Author:
- Christoph Strobl, Mark Paluch, Myroslav Kosinskyi
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiongetBody()The converted message body if available.default TThe converted message body before change if available.Message.MessagePropertiescontaining information about theMessageorigin and other metadata.getRaw()The raw message source as emitted by the origin.
-
Method Details
-
getRaw
The raw message source as emitted by the origin.- Returns:
- can be null.
-
getBody
The converted message body if available.- Returns:
- can be null.
-
getBodyBeforeChange
The converted message body before change if available.- Returns:
- can be null.
- Since:
- 4.0
-
getProperties
Message.MessageProperties getProperties()Message.MessagePropertiescontaining information about theMessageorigin and other metadata.- Returns:
- never null.
-