Skip to content

Commit

Permalink
Update to 4.0.0.CR2
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed Nov 26, 2020
1 parent f1c1d7a commit 1ddfd8c
Show file tree
Hide file tree
Showing 87 changed files with 116 additions and 117 deletions.
2 changes: 1 addition & 1 deletion amqp-proton-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>amqp-proton-examples</artifactId>
<version>4.0.0.CR1</version>
<version>4.0.0.CR2</version>

<dependencies>
<!-- primary deps -->
Expand Down
4 changes: 2 additions & 2 deletions camel-bridge-examples/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Launch it by running the `main` method in your IDE or, after having build the pr


----
java -jar target/camel-bridge-examples-4.0.0.CR1.jar run io.vertx.example.camel.feed.FeedExample
java -jar target/camel-bridge-examples-4.0.0.CR2.jar run io.vertx.example.camel.feed.FeedExample
----

== RMI example
Expand All @@ -45,7 +45,7 @@ This example demonstrates:
Launch it by running the `main` method in your IDE , after having build the project with `mvn clean package`, with:

----
java -jar target/camel-bridge-examples-4.0.0.CR1.jar run io.vertx.example.camel.rmi.RMIExample
java -jar target/camel-bridge-examples-4.0.0.CR2.jar run io.vertx.example.camel.rmi.RMIExample
----

Then open your browser to: `http://localhost:8080/?name=world`
2 changes: 1 addition & 1 deletion camel-bridge-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>camel-bridge-examples</artifactId>
<version>4.0.0.CR1</version>
<version>4.0.0.CR2</version>

<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion cassandra-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>cassandra-examples</artifactId>
<version>4.0.0.CR1</version>
<version>4.0.0.CR2</version>

<build>
<plugins>
Expand Down
2 changes: 1 addition & 1 deletion circuit-breaker-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>circuit-breaker-examples</artifactId>
<version>4.0.0.CR1</version>
<version>4.0.0.CR2</version>

<build>
<plugins>
Expand Down
2 changes: 1 addition & 1 deletion consul-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>consul-examples</artifactId>
<version>4.0.0.CR1</version>
<version>4.0.0.CR2</version>

<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion core-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>core-examples</artifactId>
<version>4.0.0.CR1</version>
<version>4.0.0.CR2</version>

<dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void start() throws Exception {
request.write("client-chunk-" + i);
}
request.end();
return request.compose(resp -> {
return request.response().compose(resp -> {
System.out.println("Got response " + resp.statusCode());
return resp.body();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void start() throws Exception {
request.write("client-chunk-" + i);
}
request.end();
return request.compose(resp -> {
return request.response().compose(resp -> {
System.out.println("Got response " + resp.statusCode());
return resp.body();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,23 @@ public void start() throws Exception {
// Note! in real-life you wouldn't often set trust all to true as it could leave you open to man in the middle attacks.

HttpClientOptions options = new HttpClientOptions().
setSsl(true).
setUseAlpn(true).
setProtocolVersion(HttpVersion.HTTP_2).
setTrustAll(true);
setSsl(true).
setUseAlpn(true).
setProtocolVersion(HttpVersion.HTTP_2).
setTrustAll(true);

HttpClient client = vertx.createHttpClient(options);

client.request(HttpMethod.GET, 8443, "localhost", "/")
.onSuccess(request -> {
request
.onSuccess(resp -> {
request.response().onSuccess(resp -> {

// Print custom frames received from server
resp.customFrameHandler(frame -> {
System.out.println("Got frame from server " + frame.payload().toString("UTF-8"));
});
})
.sendHead().onSuccess(v -> {
// Print custom frames received from server
resp.customFrameHandler(frame -> {
System.out.println("Got frame from server " + frame.payload().toString("UTF-8"));
});
});
request.sendHead().onSuccess(v -> {

// Once head has been sent we can send custom frames
vertx.setPeriodic(1000, timerID -> {
Expand All @@ -51,6 +50,6 @@ public void start() throws Exception {
request.writeCustomFrame(10, 0, Buffer.buffer("ping"));
});
});
});
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void start() throws Exception {
// Set handler for server side push
request.pushHandler(pushedReq -> {
System.out.println("Receiving pushed content");
pushedReq.compose(HttpClientResponse::body).onSuccess(body -> {
pushedReq.response().compose(HttpClientResponse::body).onSuccess(body -> {
System.out.println("Got pushed data " + body.toString("ISO-8859-1"));
});
});
Expand Down
2 changes: 1 addition & 1 deletion docker-examples/vertx-docker-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>vertx-docker-example</artifactId>
<version>4.0.0.CR1</version>
<version>4.0.0.CR2</version>

<name>Sample Docker Image with Maven</name>

Expand Down
2 changes: 1 addition & 1 deletion docker-examples/vertx-docker-java-fatjar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

FROM java:8-jre

ENV VERTICLE_FILE hello-verticle-fatjar-4.0.0.CR1-fat.jar
ENV VERTICLE_FILE hello-verticle-fatjar-4.0.0.CR2-fat.jar

# Set the location of the verticles
ENV VERTICLE_HOME /usr/verticles
Expand Down
2 changes: 1 addition & 1 deletion docker-examples/vertx-docker-java-fatjar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>hello-verticle-fatjar</artifactId>
<version>4.0.0.CR1</version>
<version>4.0.0.CR2</version>

<name>Sample Docker Image for Java - FatJar</name>

Expand Down
2 changes: 1 addition & 1 deletion docker-examples/vertx-docker-java/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
FROM vertx/vertx3

ENV VERTICLE_NAME io.vertx.sample.hello.HelloVerticle
ENV VERTICLE_FILE target/hello-verticle-4.0.0.CR1.jar
ENV VERTICLE_FILE target/hello-verticle-4.0.0.CR2.jar

# Set the location of the verticles
ENV VERTICLE_HOME /usr/verticles
Expand Down
2 changes: 1 addition & 1 deletion docker-examples/vertx-docker-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>hello-verticle</artifactId>
<version>4.0.0.CR1</version>
<version>4.0.0.CR2</version>

<name>Sample Docker Image for Java</name>

Expand Down
2 changes: 1 addition & 1 deletion examples-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>examples-utils</artifactId>
<version>4.0.0.CR1</version>
<version>4.0.0.CR2</version>

<dependencies>

Expand Down
4 changes: 2 additions & 2 deletions fatjar-examples/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To build with Maven

To run the fat jar:

java -jar target/http2-fatjar-4.0.0.CR1.jar
java -jar target/http2-fatjar-4.0.0.CR2.jar

The build.gradle uses the Gradle shadowJar plugin to assemble the application and all it's dependencies into a single "fat" jar.

Expand All @@ -24,6 +24,6 @@ To build with Gradle

To run the fat jar:

java -jar build/libs/http2-fatjar-4.0.0.CR1-all.jar
java -jar build/libs/http2-fatjar-4.0.0.CR2-all.jar

NOTE: embedding the key in the jar is a discouraged practice - it is done purposely to keep the example simple
2 changes: 1 addition & 1 deletion fatjar-examples/http2-fatjar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repositories {
// }
}

version = '4.0.0.CR1'
version = '4.0.0.CR2'
sourceCompatibility = '1.8'

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion fatjar-examples/http2-fatjar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<groupId>io.vertx</groupId>
<artifactId>http2-fatjar</artifactId>
<version>4.0.0.CR1</version>
<version>4.0.0.CR2</version>

<name>HTTP/2 fatjar</name>

Expand Down
2 changes: 1 addition & 1 deletion gradle-redeploy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repositories {
}
}

version = '4.0.0.CR1'
version = '4.0.0.CR2'
sourceCompatibility = '1.8'

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion gradle-simplest/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Because the application plugin is being used, you may directly run the applicati

You may also run the fat jar as a standalone runnable jar:

java -jar build/libs/gradle-simplest-4.0.0.CR1-fat.jar
java -jar build/libs/gradle-simplest-4.0.0.CR2-fat.jar

(You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you
don't need to install Vert.x on the target machine).
Expand Down
2 changes: 1 addition & 1 deletion gradle-simplest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repositories {
}
}

version = '4.0.0.CR1'
version = '4.0.0.CR2'
sourceCompatibility = '1.8'

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To build the "fat jar"

To run the fat jar:

java -jar build/libs/gradle-verticle-groovy-compiled-4.0.0.CR1-fat.jar
java -jar build/libs/gradle-verticle-groovy-compiled-4.0.0.CR2-fat.jar

(You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you
don't need to install Vert.x on the target machine).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repositories {
}


version = '4.0.0.CR1'
version = '4.0.0.CR2'

sourceCompatibility = '1.8'
mainClassName = 'io.vertx.core.Launcher'
Expand Down
2 changes: 1 addition & 1 deletion gradle-verticles/gradle-verticle-groovy/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To build the "fat jar"

To run the fat jar:

java -jar build/libs/gradle-verticle-groovy-4.0.0.CR1-fat.jar
java -jar build/libs/gradle-verticle-groovy-4.0.0.CR2-fat.jar

(You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you
don't need to install Vert.x on the target machine).
Expand Down
2 changes: 1 addition & 1 deletion gradle-verticles/gradle-verticle-groovy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repositories {
}


version = '4.0.0.CR1'
version = '4.0.0.CR2'

sourceCompatibility = '1.8'
mainClassName = 'io.vertx.core.Launcher'
Expand Down
8 changes: 4 additions & 4 deletions gradle-verticles/gradle-verticle/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To build the "fat jar"

To run the fat jar:

java -jar build/libs/gradle-verticle-4.0.0.CR1-fat.jar
java -jar build/libs/gradle-verticle-4.0.0.CR2-fat.jar

(You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you
don't need to install Vert.x on the target machine).
Expand All @@ -24,13 +24,13 @@ Now point your browser at http://localhost:8080
Writing code in verticles allow you to scale it more easily, e.g. let's say you have 8 cores on your server and you
want to utilise them all, you can deploy 8 instances as follows:

java -jar build/libs/gradle-verticle-4.0.0.CR1-fat.jar -instances 8
java -jar build/libs/gradle-verticle-4.0.0.CR2-fat.jar -instances 8

You can also enable clustering and ha at the command line, e.g.

java -jar build/libs/gradle-verticle-4.0.0.CR1-fat.jar -cluster
java -jar build/libs/gradle-verticle-4.0.0.CR2-fat.jar -cluster

java -jar build/libs/gradle-verticle-4.0.0.CR1-fat.jar -ha
java -jar build/libs/gradle-verticle-4.0.0.CR2-fat.jar -ha

Please see the docs for a full list of Vert.x command line options.

2 changes: 1 addition & 1 deletion gradle-verticles/gradle-verticle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repositories {
}
}

version = '4.0.0.CR1'
version = '4.0.0.CR2'
sourceCompatibility = '1.8'
mainClassName = 'io.vertx.core.Launcher'

Expand Down
2 changes: 1 addition & 1 deletion grpc-examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repositories {
def grpcVersion = '1.1.2' // CURRENT_GRPC_VERSION

dependencies {
compile "io.vertx:vertx-grpc:4.0.0.CR1"
compile "io.vertx:vertx-grpc:4.0.0.CR2"
}

protobuf {
Expand Down
2 changes: 1 addition & 1 deletion grpc-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>grpc-examples</artifactId>
<version>4.0.0.CR1</version>
<version>4.0.0.CR2</version>

<properties>
<vertx.grpc.version>1.16.1</vertx.grpc.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void start() {
// Create the channel
ManagedChannel channel = VertxChannelBuilder
.forAddress(vertx, "localhost", 8080)
.usePlaintext(true)
.usePlaintext()
.build();

// Get a stub to use for interacting with the remote service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void start() {
// Create the channel
ManagedChannel channel = VertxChannelBuilder
.forAddress(vertx, "localhost", 8080)
.usePlaintext(true)
.usePlaintext()
.build();

// Get a stub to use for interacting with the remote service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void start() {
// Create the channel
ManagedChannel channel = VertxChannelBuilder
.forAddress(vertx, "localhost", 8080)
.usePlaintext(true)
.usePlaintext()
.build();

// Get a stub to use for interacting with the remote service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static void main(String[] args) {
public void start() {
ManagedChannel channel = VertxChannelBuilder
.forAddress(vertx, "localhost", 8080)
.usePlaintext(true)
.usePlaintext()
.build();
VertxGreeterGrpc.GreeterVertxStub stub = VertxGreeterGrpc.newVertxStub(channel);
HelloRequest request = HelloRequest.newBuilder().setName("Julien").build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void start() {
// Create the channel
ManagedChannel channel = VertxChannelBuilder
.forAddress(vertx, "localhost", 8080)
.usePlaintext(true)
.usePlaintext()
.build();

// Get a stub to use for interacting with the remote service
Expand Down
Loading

0 comments on commit 1ddfd8c

Please sign in to comment.