Skip to content

Commit 9d41560

Browse files
committed
Merge PR #68
2 parents c85de55 + 20b08d3 commit 9d41560

File tree

76 files changed

+4483
-5076
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+4483
-5076
lines changed

.editorconfig

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# http://editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
indent_style = space
9+
indent_size = 4
10+
end_of_line = lf
11+
charset = utf-8
12+
trim_trailing_whitespace = true
13+
insert_final_newline = true
14+
15+
[*.md]
16+
trim_trailing_whitespace = false
17+
18+
[*.adoc]
19+
trim_trailing_whitespace = false
File renamed without changes.

NOTICE

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
=========================================================================
2+
== NOTICE file corresponding to section 4(d) of the Apache License, ==
3+
== Version 2.0, in this case for Microprofile Reactive Streams ==
4+
=========================================================================
5+
6+
This product includes software developed at
7+
The Apache Software Foundation (http://www.apache.org/).
8+
9+
SPDXVersion: SPDX-2.1
10+
PackageName: Eclipse Microprofile
11+
PackageHomePage: http://www.eclipse.org/microprofile
12+
PackageLicenseDeclared: Apache-2.0
13+
14+
PackageCopyrightText: <text>
15+
James Roper [email protected]
16+
</text>

messaging/api/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
~ See the License for the specific language governing permissions and
1818
~ limitations under the License.
1919
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
20-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
2121
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2222
<modelVersion>4.0.0</modelVersion>
2323

@@ -41,7 +41,7 @@
4141
<artifactId>org.osgi.annotation.versioning</artifactId>
4242
</dependency>
4343
<dependency>
44-
<groupId>org.eclipse.microprofile.reactive.streams</groupId>
44+
<groupId>org.eclipse.microprofile.reactive.streams</groupId>
4545
<artifactId>microprofile-reactive-streams-operators</artifactId>
4646
</dependency>
4747
</dependencies>

messaging/api/src/main/java/org/eclipse/microprofile/reactive/messaging/Incoming.java

+30-30
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
* Methods annotated with this annotation must have one of the following shapes:
3131
* <p>
3232
* <ul>
33-
* <li>Take zero parameters, and return a {@link org.eclipse.microprofile.reactive.streams.SubscriberBuilder}.</li>
34-
* <li>Take zero parameters, and return a {@link org.reactivestreams.Subscriber}.</li>
35-
* <li>Take zero parameters, and return a {@link org.eclipse.microprofile.reactive.streams.ProcessorBuilder}.</li>
36-
* <li>Take zero parameters, and return a {@link org.reactivestreams.Processor}.</li>
37-
* <li>Accept a single parameter, and return a {@link java.util.concurrent.CompletionStage}.</li>
38-
* <li>Accept a single parameter, and return void.</li>
39-
* <li>Accept a single parameter, and return any type.</li>
33+
* <li>Take zero parameters, and return a {@link org.eclipse.microprofile.reactive.streams.SubscriberBuilder}.</li>
34+
* <li>Take zero parameters, and return a {@link org.reactivestreams.Subscriber}.</li>
35+
* <li>Take zero parameters, and return a {@link org.eclipse.microprofile.reactive.streams.ProcessorBuilder}.</li>
36+
* <li>Take zero parameters, and return a {@link org.reactivestreams.Processor}.</li>
37+
* <li>Accept a single parameter, and return a {@link java.util.concurrent.CompletionStage}.</li>
38+
* <li>Accept a single parameter, and return void.</li>
39+
* <li>Accept a single parameter, and return any type.</li>
4040
* </ul>
4141
* <p>
4242
* In addition, implementations of this specification may allow returning additional types, such as implementation
@@ -80,28 +80,28 @@
8080
@Retention(RetentionPolicy.RUNTIME)
8181
public @interface Incoming {
8282

83-
/**
84-
* The topic to subscribe to.
85-
* <p>
86-
* If not set, it is assumed some other messaging provider specific mechanism will be used to identify which
87-
* messages this subscriber will receive.
88-
*/
89-
String topic() default "";
83+
/**
84+
* The topic to subscribe to.
85+
* <p>
86+
* If not set, it is assumed some other messaging provider specific mechanism will be used to identify which
87+
* messages this subscriber will receive.
88+
*/
89+
String topic() default "";
9090

91-
/**
92-
* The messaging provider.
93-
* <p>
94-
* If not set, then the container may provide a container specific mechanism for selecting a default messaging
95-
* provider.
96-
* <p>
97-
* Note that not all messaging providers are compatible with all containers, it is up to each container to
98-
* decide which messaging providers it will accept, to define the messaging provider classes to pass here, and
99-
* to potentially offer a container specific extension point for plugging in new containers.
100-
* <p>
101-
* If the container does not support the selected messaging provider, it must raise a deployment exception before
102-
* the container is initialized.
103-
* <p>
104-
* The use of this property is inherently non portable.
105-
*/
106-
Class<? extends MessagingProvider> provider() default MessagingProvider.class;
91+
/**
92+
* The messaging provider.
93+
* <p>
94+
* If not set, then the container may provide a container specific mechanism for selecting a default messaging
95+
* provider.
96+
* <p>
97+
* Note that not all messaging providers are compatible with all containers, it is up to each container to
98+
* decide which messaging providers it will accept, to define the messaging provider classes to pass here, and
99+
* to potentially offer a container specific extension point for plugging in new containers.
100+
* <p>
101+
* If the container does not support the selected messaging provider, it must raise a deployment exception before
102+
* the container is initialized.
103+
* <p>
104+
* The use of this property is inherently non portable.
105+
*/
106+
Class<? extends MessagingProvider> provider() default MessagingProvider.class;
107107
}

messaging/api/src/main/java/org/eclipse/microprofile/reactive/messaging/Message.java

+38-38
Original file line numberDiff line numberDiff line change
@@ -33,46 +33,46 @@
3333
*/
3434
public interface Message<T> {
3535

36-
/**
37-
* The payload for this message.
38-
*/
39-
T getPayload();
36+
/**
37+
* Create a message with the given payload.
38+
*
39+
* @param payload The payload.
40+
* @return A message with the given payload, and a no-op ack function.
41+
*/
42+
static <T> Message<T> of(T payload) {
43+
return () -> payload;
44+
}
4045

41-
/**
42-
* Acknowledge this message.
43-
*/
44-
default CompletionStage<Void> ack() {
45-
return CompletableFuture.completedFuture(null);
46-
}
46+
/**
47+
* Create a message with the given payload and ack function.
48+
*
49+
* @param payload The payload.
50+
* @param ack The ack function, this will be invoked when the returned messages {@link #ack()} method is invoked.
51+
* @return A message with the given payload and ack function.
52+
*/
53+
static <T> Message<T> of(T payload, Supplier<CompletionStage<Void>> ack) {
54+
return new Message<T>() {
55+
@Override
56+
public T getPayload() {
57+
return payload;
58+
}
4759

48-
/**
49-
* Create a message with the given payload.
50-
*
51-
* @param payload The payload.
52-
* @return A message with the given payload, and a no-op ack function.
53-
*/
54-
static <T> Message<T> of(T payload) {
55-
return () -> payload;
56-
}
60+
@Override
61+
public CompletionStage<Void> ack() {
62+
return ack.get();
63+
}
64+
};
65+
}
5766

58-
/**
59-
* Create a message with the given payload and ack function.
60-
*
61-
* @param payload The payload.
62-
* @param ack The ack function, this will be invoked when the returned messages {@link #ack()} method is invoked.
63-
* @return A message with the given payload and ack function.
64-
*/
65-
static <T> Message<T> of(T payload, Supplier<CompletionStage<Void>> ack) {
66-
return new Message<T>() {
67-
@Override
68-
public T getPayload() {
69-
return payload;
70-
}
67+
/**
68+
* The payload for this message.
69+
*/
70+
T getPayload();
7171

72-
@Override
73-
public CompletionStage<Void> ack() {
74-
return ack.get();
75-
}
76-
};
77-
}
72+
/**
73+
* Acknowledge this message.
74+
*/
75+
default CompletionStage<Void> ack() {
76+
return CompletableFuture.completedFuture(null);
77+
}
7878
}

messaging/api/src/main/java/org/eclipse/microprofile/reactive/messaging/Outgoing.java

+29-29
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
* Methods annotated with this annotation must have one of the following shapes:
3131
* <p>
3232
* <ul>
33-
* <li>Take zero parameters, and return a {@link org.eclipse.microprofile.reactive.streams.PublisherBuilder}.</li>
34-
* <li>Take zero parameters, and return a {@link org.reactivestreams.Publisher}.</li>
35-
* <li>Take zero parameters, and return a {@link org.eclipse.microprofile.reactive.streams.ProcessorBuilder}.</li>
36-
* <li>Take zero parameters, and return a {@link org.reactivestreams.Processor}.</li>
37-
* <li>Accept a single parameter, and return a {@link java.util.concurrent.CompletionStage}.</li>
38-
* <li>Accept a single parameter, and return any type.</li>
33+
* <li>Take zero parameters, and return a {@link org.eclipse.microprofile.reactive.streams.PublisherBuilder}.</li>
34+
* <li>Take zero parameters, and return a {@link org.reactivestreams.Publisher}.</li>
35+
* <li>Take zero parameters, and return a {@link org.eclipse.microprofile.reactive.streams.ProcessorBuilder}.</li>
36+
* <li>Take zero parameters, and return a {@link org.reactivestreams.Processor}.</li>
37+
* <li>Accept a single parameter, and return a {@link java.util.concurrent.CompletionStage}.</li>
38+
* <li>Accept a single parameter, and return any type.</li>
3939
* </ul>
4040
* <p>
4141
* In addition, implementations of this specification may allow returning additional types, such as implementation
@@ -64,28 +64,28 @@
6464
@Retention(RetentionPolicy.RUNTIME)
6565
public @interface Outgoing {
6666

67-
/**
68-
* The topic to publish to.
69-
* <p>
70-
* If not set, it is assumed some other messaging provider specific mechanism will be used to identify the
71-
* destination that this publisher will send to.
72-
*/
73-
String topic() default "";
67+
/**
68+
* The topic to publish to.
69+
* <p>
70+
* If not set, it is assumed some other messaging provider specific mechanism will be used to identify the
71+
* destination that this publisher will send to.
72+
*/
73+
String topic() default "";
7474

75-
/**
76-
* The messaging provider.
77-
* <p>
78-
* If not set, then the container may provide a container specific mechanism for selecting a default messaging
79-
* provider.
80-
* <p>
81-
* Note that not all messaging providers are compatible with all containers, it is up to each container to
82-
* decide which messaging providers it will accept, to define the messaging provider classes to pass here, and
83-
* to potentially offer a container specific extension point for plugging in new containers.
84-
* <p>
85-
* If the container does not support the selected messaging provider, it must raise a deployment exception before
86-
* the container is initialized.
87-
* <p>
88-
* The use of this property is inherently non portable.
89-
*/
90-
Class<? extends MessagingProvider> provider() default MessagingProvider.class;
75+
/**
76+
* The messaging provider.
77+
* <p>
78+
* If not set, then the container may provide a container specific mechanism for selecting a default messaging
79+
* provider.
80+
* <p>
81+
* Note that not all messaging providers are compatible with all containers, it is up to each container to
82+
* decide which messaging providers it will accept, to define the messaging provider classes to pass here, and
83+
* to potentially offer a container specific extension point for plugging in new containers.
84+
* <p>
85+
* If the container does not support the selected messaging provider, it must raise a deployment exception before
86+
* the container is initialized.
87+
* <p>
88+
* The use of this property is inherently non portable.
89+
*/
90+
Class<? extends MessagingProvider> provider() default MessagingProvider.class;
9191
}

messaging/api/src/main/java/org/eclipse/microprofile/reactive/messaging/package-info.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@
5353
* }
5454
* </pre>
5555
*/
56-
package org.eclipse.microprofile.reactive.messaging;
56+
package org.eclipse.microprofile.reactive.messaging;

messaging/checkstyle.xml

-92
This file was deleted.

0 commit comments

Comments
 (0)