Package akka.javasdk.testkit
Class EventingTestKit.MessageBuilder
Object
akka.javasdk.testkit.EventingTestKit.MessageBuilder
- Enclosing interface:
EventingTestKit
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> EventingTestKit.Message
<T> of
(T payload, akka.javasdk.Metadata metadata) Create a message object from a payload plus metadata.<T> EventingTestKit.Message
<T> Create a message from a payload plus a subject (that is, the entity id).
-
Constructor Details
-
MessageBuilder
public MessageBuilder(akka.javasdk.impl.MessageCodec messageCodec)
-
-
Method Details
-
of
Create a message from a payload plus a subject (that is, the entity id). Automatically adds required default metadata for a CloudEvent.- Type Parameters:
T
-- Parameters:
payload
- the message payloadsubject
- the entity id of which the message is concerned about- Returns:
- a Message object to be used in the context of the Testkit
-
of
Create a message object from a payload plus metadata.- Type Parameters:
T
-- Parameters:
payload
- the message payloadmetadata
- the metadata associated with the message- Returns:
- a Message object to be used in the context of the Testkit
-