Skip to content

Commit f1c3198

Browse files
committed
Merge branch 'release/1.0.0-RC7'
2 parents 83d97f7 + a5706bf commit f1c3198

File tree

191 files changed

+8397
-4933
lines changed

Some content is hidden

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

191 files changed

+8397
-4933
lines changed

Diff for: .travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ matrix:
2323
- jdk: openjdk8
2424
- jdk: openjdk11
2525
env: SKIP_RELEASE=true
26-
- jdk: openjdk13
26+
- jdk: openjdk14
2727
env: SKIP_RELEASE=true
2828

2929
env:

Diff for: README.md

+32-18
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,26 @@ Releases are available via Maven Central.
2222
Example:
2323

2424
```groovy
25+
repositories {
26+
mavenCentral()
27+
}
28+
dependencies {
29+
implementation 'io.rsocket:rsocket-core:1.0.0-RC6'
30+
implementation 'io.rsocket:rsocket-transport-netty:1.0.0-RC6'
31+
}
32+
```
33+
34+
Snapshots are available via [oss.jfrog.org](oss.jfrog.org) (OJO).
35+
36+
Example:
37+
38+
```groovy
39+
repositories {
40+
maven { url 'https://oss.jfrog.org/oss-snapshot-local' }
41+
}
2542
dependencies {
26-
implementation 'io.rsocket:rsocket-core:1.0.0-RC3'
27-
implementation 'io.rsocket:rsocket-transport-netty:1.0.0-RC3'
28-
// implementation 'io.rsocket:rsocket-core:1.0.0-RC4-SNAPSHOT'
29-
// implementation 'io.rsocket:rsocket-transport-netty:1.0.0-RC4-SNAPSHOT'
43+
implementation 'io.rsocket:rsocket-core:1.0.0-RC7-SNAPSHOT'
44+
implementation 'io.rsocket:rsocket-transport-netty:1.0.0-RC7-SNAPSHOT'
3045
}
3146
```
3247

@@ -57,7 +72,7 @@ package io.rsocket.transport.netty;
5772

5873
import io.rsocket.Payload;
5974
import io.rsocket.RSocket;
60-
import io.rsocket.RSocketFactory;
75+
import io.rsocket.core.RSocketConnector;
6176
import io.rsocket.transport.netty.client.WebsocketClientTransport;
6277
import io.rsocket.util.DefaultPayload;
6378
import reactor.core.publisher.Flux;
@@ -67,14 +82,14 @@ import java.net.URI;
6782
public class ExampleClient {
6883
public static void main(String[] args) {
6984
WebsocketClientTransport ws = WebsocketClientTransport.create(URI.create("ws://rsocket-demo.herokuapp.com/ws"));
70-
RSocket client = RSocketFactory.connect().keepAlive().transport(ws).start().block();
85+
RSocket clientRSocket = RSocketConnector.connectWith(ws).block();
7186

7287
try {
73-
Flux<Payload> s = client.requestStream(DefaultPayload.create("peace"));
88+
Flux<Payload> s = clientRSocket.requestStream(DefaultPayload.create("peace"));
7489

7590
s.take(10).doOnNext(p -> System.out.println(p.getDataUtf8())).blockLast();
7691
} finally {
77-
client.dispose();
92+
clientRSocket.dispose();
7893
}
7994
}
8095
}
@@ -89,25 +104,24 @@ or you will get a memory leak. Used correctly this will reduce latency and incre
89104

90105
### Example Server setup
91106
```java
92-
RSocketFactory.receive()
107+
RSocketServer.create(new PingHandler())
93108
// Enable Zero Copy
94-
.frameDecoder(PayloadDecoder.ZERO_COPY)
95-
.acceptor(new PingHandler())
96-
.transport(TcpServerTransport.create(7878))
97-
.start()
109+
.payloadDecoder(PayloadDecoder.ZERO_COPY)
110+
.bind(TcpServerTransport.create(7878))
98111
.block()
99112
.onClose()
100113
.block();
101114
```
102115

103116
### Example Client setup
104117
```java
105-
Mono<RSocket> client =
106-
RSocketFactory.connect()
118+
RSocket clientRSocket =
119+
RSocketConnector.create()
107120
// Enable Zero Copy
108-
.frameDecoder(PayloadDecoder.ZERO_COPY)
109-
.transport(TcpClientTransport.create(7878))
110-
.start();
121+
.payloadDecoder(PayloadDecoder.ZERO_COPY)
122+
.connect(TcpClientTransport.create(7878))
123+
.start()
124+
.block();
111125
```
112126

113127
## Bugs and Feedback

Diff for: build.gradle

+56-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2018 the original author or authors.
2+
* Copyright 2015-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,12 +26,12 @@ plugins {
2626
subprojects {
2727
apply plugin: 'io.spring.dependency-management'
2828
apply plugin: 'com.github.sherter.google-java-format'
29-
30-
ext['reactor-bom.version'] = 'Dysprosium-RELEASE'
29+
30+
ext['reactor-bom.version'] = 'Dysprosium-SR7'
3131
ext['logback.version'] = '1.2.3'
3232
ext['findbugs.version'] = '3.0.2'
33-
ext['netty-bom.version'] = '4.1.37.Final'
34-
ext['netty-boringssl.version'] = '2.0.25.Final'
33+
ext['netty-bom.version'] = '4.1.48.Final'
34+
ext['netty-boringssl.version'] = '2.0.30.Final'
3535
ext['hdrhistogram.version'] = '2.1.10'
3636
ext['mockito.version'] = '3.2.0'
3737
ext['slf4j.version'] = '1.7.25'
@@ -88,11 +88,18 @@ subprojects {
8888
repositories {
8989
mavenCentral()
9090

91-
if (version.endsWith('BUILD-SNAPSHOT') || project.hasProperty('platformVersion')) {
91+
if (version.endsWith('SNAPSHOT') || project.hasProperty('platformVersion')) {
9292
maven { url 'http://repo.spring.io/libs-snapshot' }
93+
maven {
94+
url 'https://oss.jfrog.org/artifactory/oss-snapshot-local'
95+
}
9396
}
9497
}
9598

99+
tasks.withType(GenerateModuleMetadata) {
100+
enabled = false
101+
}
102+
96103
plugins.withType(JavaPlugin) {
97104
compileJava {
98105
sourceCompatibility = 1.8
@@ -102,21 +109,61 @@ subprojects {
102109
}
103110

104111
javadoc {
112+
def jdk = JavaVersion.current().majorVersion
113+
def jdkJavadoc = "https://docs.oracle.com/javase/$jdk/docs/api/"
114+
if (JavaVersion.current().isJava11Compatible()) {
115+
jdkJavadoc = "https://docs.oracle.com/en/java/javase/$jdk/docs/api/"
116+
}
105117
options.with {
106-
links 'https://docs.oracle.com/javase/8/docs/api/'
118+
links jdkJavadoc
107119
links 'https://projectreactor.io/docs/core/release/api/'
108120
links 'https://netty.io/4.1/api/'
109121
}
110122
}
111123

124+
tasks.named("javadoc").configure {
125+
onlyIf { System.getenv('SKIP_RELEASE') != "true" }
126+
}
127+
112128
test {
113129
useJUnitPlatform()
114130

115131
systemProperty "io.netty.leakDetection.level", "ADVANCED"
116132
}
117133

118-
tasks.named("javadoc").configure {
119-
onlyIf { System.getenv('SKIP_RELEASE') != "true" }
134+
//all test tasks will show FAILED for each test method,
135+
// common exclusions, no scanning
136+
project.tasks.withType(Test).all {
137+
testLogging {
138+
events "FAILED"
139+
showExceptions true
140+
exceptionFormat "FULL"
141+
stackTraceFilters "ENTRY_POINT"
142+
maxGranularity 3
143+
}
144+
145+
if (JavaVersion.current().isJava9Compatible()) {
146+
println "Java 9+: lowering MaxGCPauseMillis to 20ms in ${project.name} ${name}"
147+
jvmArgs = ["-XX:MaxGCPauseMillis=20"]
148+
}
149+
150+
systemProperty("java.awt.headless", "true")
151+
systemProperty("reactor.trace.cancel", "true")
152+
systemProperty("reactor.trace.nocapacity", "true")
153+
systemProperty("testGroups", project.properties.get("testGroups"))
154+
scanForTestClasses = false
155+
exclude '**/*Abstract*.*'
156+
157+
//allow re-run of failed tests only without special test tasks failing
158+
// because the filter is too restrictive
159+
filter.setFailOnNoMatchingTests(false)
160+
161+
//display intermediate results for special test tasks
162+
afterSuite { desc, result ->
163+
if (!desc.parent) { // will match the outermost suite
164+
println('\n' + "${desc} Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)")
165+
}
166+
}
120167
}
121168
}
122169

Diff for: gradle.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313
#
14-
version=1.0.0-RC6
15-
perfBaselineVersion=1.0.0-RC5
14+
version=1.0.0-RC7
15+
perfBaselineVersion=1.0.0-RC6

Diff for: gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

Diff for: rsocket-core/src/main/java/io/rsocket/Closeable.java

+9-5
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,21 @@
1616

1717
package io.rsocket;
1818

19+
import org.reactivestreams.Subscriber;
1920
import reactor.core.Disposable;
2021
import reactor.core.publisher.Mono;
2122

22-
/** */
23+
/** An interface which allows listening to when a specific instance of this interface is closed */
2324
public interface Closeable extends Disposable {
2425
/**
25-
* Returns a {@code Publisher} that completes when this {@code RSocket} is closed. A {@code
26-
* RSocket} can be closed by explicitly calling {@link RSocket#dispose()} or when the underlying
27-
* transport connection is closed.
26+
* Returns a {@link Mono} that terminates when the instance is terminated by any reason. Note, in
27+
* case of error termination, the cause of error will be propagated as an error signal through
28+
* {@link org.reactivestreams.Subscriber#onError(Throwable)}. Otherwise, {@link
29+
* Subscriber#onComplete()} will be called.
2830
*
29-
* @return A {@code Publisher} that completes when this {@code RSocket} close is complete.
31+
* @return a {@link Mono} to track completion with success or error of the underlying resource.
32+
* When the underlying resource is an `RSocket`, the {@code Mono} exposes stream 0 (i.e.
33+
* connection level) errors.
3034
*/
3135
Mono<Void> onClose();
3236
}

0 commit comments

Comments
 (0)