Package org.axonframework.messaging.core
Interface MessageStream.Entry<M extends Message>
- Type Parameters:
M- The type ofMessagecontained in thisMessageStream.Entryimplementation.
- All Superinterfaces:
Context
- All Known Implementing Classes:
SimpleEntry
- Enclosing interface:
MessageStream<M extends Message>
A
MessageStream-specific container of Message implementations.
May be implemented to support entries that contain several objects. As such, this interface may be
regarded as a tuple.
- Since:
- 5.0.0
- Author:
- Allard Buijze, Milan Savić, Mitchell Herrijgers, Steven van Beelen
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.axonframework.messaging.core.Context
Context.ResourceKey<T> -
Method Summary
Modifier and TypeMethodDescription<RM extends Message>
MessageStream.Entry<RM> Maps themessage()by running it through the givenmapper.message()Returns theMessageimplementation contained by this Entry.<T> MessageStream.Entry<M> withResource(Context.ResourceKey<T> key, T resource) Constructs a copy ofthisContext with an additionalresourcefor givenkey.Methods inherited from interface org.axonframework.messaging.core.Context
containsResource, getResource, resources
-
Method Details
-
message
M message()Returns theMessageimplementation contained by this Entry.- Returns:
- The
Messageimplementation contained by this Entry.
-
map
-
withResource
Description copied from interface:ContextConstructs a copy ofthisContext with an additionalresourcefor givenkey.- Specified by:
withResourcein interfaceContext- Type Parameters:
T- The type of resource registered under the givenkey.- Parameters:
key- The key under which to register theresource.resource- The resource to register.- Returns:
- A copy of
thisContext with the added givenresourcesunder the givenkeyto the copy.
-