Interface InMemorySource<T>
- Type Parameters:
T- the type of payload or message.
public interface InMemorySource<T>
Allows interacting with an in-memory source.
An in-memory source is a channel in which you can inject messages using this API.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcomplete()Sends the completion event.voidSends a failure.name()runOnVertxContext(boolean runOnVertxContext) The flag to enable dispatching messages on Vert.x context.Sends a message or a payload to the channel.
-
Method Details
-
name
String name()- Returns:
- the channel name.
-
send
Sends a message or a payload to the channel.- Parameters:
messageOrPayload- the message or payload to send. In the case of a payload, a simple message is created. Must not benull- Returns:
- this to allow chaining calls.
-
runOnVertxContext
The flag to enable dispatching messages on Vert.x context.- Parameters:
runOnVertxContext- whether to dispatch messages on Vert.x context or not- Returns:
- this to allow chaining calls.
-
complete
void complete()Sends the completion event. -
fail
Sends a failure.- Parameters:
failure- the failure, must not benull
-