SLING-5643 Provide a simple messaging API

* use CompletableFuture instead of Future
* remove Failure

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1738225 13f79535-47bb-0310-9956-ffa450edef68
4 files changed
tree: 2265a14c593b9d8f93ca7d558a4c64ade97beba9
  1. src/
  2. pom.xml
  3. README.md
README.md

Apache Sling Commons Messaging

Simple API for sending message​s to recipient​s.

MessageService

  • send(String, String) - takes a message​ and a recipient, e.g.
    • send(“A Message to You, Rudy”, “rudy@ghosttown”) - send a mail to Rudy in Ghost Town
    • send(“Hello Apache!”, “+1.919.573.9199”) - send a fax to the ASF
  • send(String, String, Map) - takes a message, a recipient and additional data useful for the underlying implementation to process and/or send the message

Result<T>

  • getMessage():T - should return a serialized form of the sent message