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
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiongetBody()
The converted message body if available.Message.MessageProperties
containing information about theMessage
origin 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.
-
getProperties
Message.MessageProperties getProperties()Message.MessageProperties
containing information about theMessage
origin and other metadata.- Returns:
- never null.
-