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 Type
    Method
    Description
    void
    Sends the completion event.
    void
    fail(Throwable failure)
    Sends a failure.
     
    send(T messageOrPayload)
    Sends a message or a payload to the channel.
  • Method Details

    • name

      String name()
      Returns:
      the channel name.
    • send

      InMemorySource<T> send(T messageOrPayload)
      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 be null
      Returns:
      this to allow chaining calls.
    • complete

      void complete()
      Sends the completion event.
    • fail

      void fail(Throwable failure)
      Sends a failure.
      Parameters:
      failure - the failure, must not be null