You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2019/12/15 18:19:26 UTC

[sling-org-apache-sling-commons-messaging] branch master updated (4cedf7d -> 6c1ba41)

This is an automated email from the ASF dual-hosted git repository.

olli pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-messaging.git.


    from 4cedf7d  Updating badges for org-apache-sling-commons-messaging
     new 6c8e3d0  SLING-8840 Update to Sling Bundle Parent 35
     new 6c1ba41  SLING-5643 Provide a simple messaging API

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.md                                          | 13 +--------
 bnd.bnd                                            | 12 --------
 pom.xml                                            | 14 ++++------
 .../sling/commons/messaging/MessageService.java    | 18 +++---------
 .../org/apache/sling/commons/messaging/Result.java | 32 ----------------------
 5 files changed, 10 insertions(+), 79 deletions(-)
 delete mode 100644 src/main/java/org/apache/sling/commons/messaging/Result.java


[sling-org-apache-sling-commons-messaging] 02/02: SLING-5643 Provide a simple messaging API

Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-messaging.git

commit 6c1ba41c5c0e063e9941d45b25c28b19326c1502
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Dec 10 11:25:54 2019 +0100

    SLING-5643 Provide a simple messaging API
    
    Make API very simple
---
 README.md                                          | 13 +--------
 .../sling/commons/messaging/MessageService.java    | 18 +++---------
 .../org/apache/sling/commons/messaging/Result.java | 32 ----------------------
 3 files changed, 5 insertions(+), 58 deletions(-)

diff --git a/README.md b/README.md
index f7eade8..7170f6f 100644
--- a/README.md
+++ b/README.md
@@ -6,15 +6,4 @@
 
 This module is part of the [Apache Sling](https://sling.apache.org) project.
 
-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*
+Common API for services sending message​s.
diff --git a/src/main/java/org/apache/sling/commons/messaging/MessageService.java b/src/main/java/org/apache/sling/commons/messaging/MessageService.java
index 247b39c..05aa79e 100644
--- a/src/main/java/org/apache/sling/commons/messaging/MessageService.java
+++ b/src/main/java/org/apache/sling/commons/messaging/MessageService.java
@@ -18,28 +18,18 @@
  */
 package org.apache.sling.commons.messaging;
 
-import java.util.Map;
 import java.util.concurrent.CompletableFuture;
 
 import org.jetbrains.annotations.NotNull;
 import org.osgi.annotation.versioning.ProviderType;
 
 @ProviderType
-public interface MessageService {
+public interface MessageService<T> {
 
     /**
-     * @param message   the message to send
-     * @param recipient the recipient of the message
-     * @return result of sending the message
+     * @param message the message to send
+     * @return the sent message
      */
-    CompletableFuture<Result> send(@NotNull final String message, @NotNull final String recipient);
-
-    /**
-     * @param message   the message to send
-     * @param recipient the recipient of the message
-     * @param data      additional information (e.g. attachments) and/or parameters (e.g. sender) for the message
-     * @return result of sending the message
-     */
-    CompletableFuture<Result> send(@NotNull final String message, @NotNull final String recipient, @NotNull final Map data);
+    CompletableFuture<T> sendMessage(@NotNull final T message);
 
 }
diff --git a/src/main/java/org/apache/sling/commons/messaging/Result.java b/src/main/java/org/apache/sling/commons/messaging/Result.java
deleted file mode 100644
index 7d9d547..0000000
--- a/src/main/java/org/apache/sling/commons/messaging/Result.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.sling.commons.messaging;
-
-import org.jetbrains.annotations.Nullable;
-import org.osgi.annotation.versioning.ProviderType;
-
-@ProviderType
-public interface Result<T> {
-
-    /**
-     * @return serialized form of the sent message
-     */
-    @Nullable T getMessage();
-
-}


[sling-org-apache-sling-commons-messaging] 01/02: SLING-8840 Update to Sling Bundle Parent 35

Posted by ol...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-messaging.git

commit 6c8e3d090e50735af95acefe66e62a07b479634b
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Dec 10 11:23:26 2019 +0100

    SLING-8840 Update to Sling Bundle Parent 35
---
 bnd.bnd | 12 ------------
 pom.xml | 14 +++++---------
 2 files changed, 5 insertions(+), 21 deletions(-)

diff --git a/bnd.bnd b/bnd.bnd
index 6f12f39..e36a0d6 100644
--- a/bnd.bnd
+++ b/bnd.bnd
@@ -1,15 +1,3 @@
-Bundle-Category: sling
-
-Bundle-Description: ${project.description}
-
-Bundle-DocURL: https://sling.apache.org
-
-Bundle-License: Apache License, Version 2.0
-
-Bundle-Vendor: The Apache Software Foundation
-
--exportcontents: ${packages;VERSIONED}
-
 -removeheaders:\
   Include-Resource,\
   Private-Package
diff --git a/pom.xml b/pom.xml
index 10a6656..f191798 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,8 +23,8 @@
 
   <parent>
     <groupId>org.apache.sling</groupId>
-    <artifactId>sling</artifactId>
-    <version>34</version>
+    <artifactId>sling-bundle-parent</artifactId>
+    <version>35</version>
     <relativePath/>
   </parent>
 
@@ -50,15 +50,11 @@
     <plugins>
       <plugin>
         <groupId>biz.aQute.bnd</groupId>
-        <artifactId>bnd-maven-plugin</artifactId>
-      </plugin>
-      <!-- enable baseline after initial release -->
-      <!--
-      <plugin>
-        <groupId>biz.aQute.bnd</groupId>
         <artifactId>bnd-baseline-maven-plugin</artifactId>
+        <configuration>
+          <failOnMissing>false</failOnMissing>
+        </configuration>
       </plugin>
-      -->
     </plugins>
   </build>