Skip to content

Commit d15086e

Browse files
committed
Regen code
1 parent cf0f46d commit d15086e

File tree

25 files changed

+62
-81
lines changed

25 files changed

+62
-81
lines changed

mqtt-examples/src/main/groovy/io/vertx/example/mqtt/app/client.groovy

+4-6
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ import io.vertx.core.buffer.Buffer
55
import io.netty.handler.codec.mqtt.MqttQoS
66
@Field def MQTT_MESSAGE = "Hello Vert.x MQTT Client"
77
@Field def BROKER_HOST = "localhost"
8-
@Field def BROKER_PORT = 1883
98
@Field def MQTT_TOPIC = "/my_topic"
9+
@Field def BROKER_PORT = 1883
1010
def options = [
11-
port:BROKER_PORT,
12-
host:BROKER_HOST,
1311
keepAliveTimeSeconds:2
1412
]
1513

@@ -22,7 +20,7 @@ client.publishHandler({ publish ->
2220
})
2321

2422
// handle response on subscribe request
25-
client.subscribeCompleteHandler({ h ->
23+
client.subscribeCompletionHandler({ h ->
2624
println("Receive SUBACK from server with granted QoS : ${h.grantedQoSLevels()}")
2725

2826
// let's publish a message to the subscribed topic
@@ -37,7 +35,7 @@ client.subscribeCompleteHandler({ h ->
3735
})
3836

3937
// handle response on unsubscribe request
40-
client.unsubscribeCompleteHandler({ h ->
38+
client.unsubscribeCompletionHandler({ h ->
4139
println("Receive UNSUBACK from server")
4240
vertx.setTimer(5000, { l ->
4341
client.disconnect({ d ->
@@ -47,7 +45,7 @@ client.unsubscribeCompleteHandler({ h ->
4745
})
4846

4947
// connect to a server
50-
client.connect({ ch ->
48+
client.connect(BROKER_PORT, BROKER_HOST, { ch ->
5149
if (ch.succeeded()) {
5250
println("Connected to a server")
5351
client.subscribe(MQTT_TOPIC, 0)

mqtt-examples/src/main/groovy/io/vertx/example/mqtt/app/server.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ mqttServer.endpointHandler({ endpoint ->
4444

4545
endpoint.publishRelease(messageId)
4646

47-
}).publishCompleteHandler({ messageId ->
47+
}).publishCompletionHandler({ messageId ->
4848

4949
println("Received ack for message = ${messageId}")
5050
})

mqtt-examples/src/main/groovy/io/vertx/example/mqtt/simple/client.groovy

+2-7
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,9 @@ import io.netty.handler.codec.mqtt.MqttQoS
66
@Field def BROKER_HOST = "localhost"
77
@Field def BROKER_PORT = 1883
88
@Field def MQTT_TOPIC = "/my_topic"
9-
def options = [
10-
port:BROKER_PORT,
11-
host:BROKER_HOST
12-
]
9+
def mqttClient = MqttClient.create(vertx)
1310

14-
def mqttClient = MqttClient.create(vertx, options)
15-
16-
mqttClient.connect({ ch ->
11+
mqttClient.connect(BROKER_PORT, BROKER_HOST, { ch ->
1712
if (ch.succeeded()) {
1813
println("Connected to a server")
1914

mqtt-examples/src/main/groovy/io/vertx/example/mqtt/ssl/client.groovy

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ import io.netty.handler.codec.mqtt.MqttQoS
77
@Field def BROKER_PORT = 8883
88
@Field def MQTT_TOPIC = "/my_topic"
99
def options = [:]
10-
options.port = BROKER_PORT
11-
options.host = BROKER_HOST
1210
options.ssl = true
1311
options.trustAll = true
1412

1513
def mqttClient = MqttClient.create(vertx, options)
1614

17-
mqttClient.connect({ ch ->
15+
mqttClient.connect(BROKER_PORT, BROKER_HOST, { ch ->
1816
if (ch.succeeded()) {
1917
println("Connected to a server")
2018

mqtt-examples/src/main/js/io/vertx/example/mqtt/app/client.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ var MqttClient = require("vertx-mqtt-server-js/mqtt_client");
33
var Buffer = require("vertx-js/buffer");
44
var MQTT_MESSAGE = "Hello Vert.x MQTT Client";
55
var BROKER_HOST = "localhost";
6-
var BROKER_PORT = 1883;
76
var MQTT_TOPIC = "/my_topic";
7+
var BROKER_PORT = 1883;
88
var options = {
9-
"port" : BROKER_PORT,
10-
"host" : BROKER_HOST,
119
"keepAliveTimeSeconds" : 2
1210
};
1311

@@ -20,7 +18,7 @@ client.publishHandler(function (publish) {
2018
});
2119

2220
// handle response on subscribe request
23-
client.subscribeCompleteHandler(function (h) {
21+
client.subscribeCompletionHandler(function (h) {
2422
console.log("Receive SUBACK from server with granted QoS : " + h.grantedQoSLevels());
2523

2624
// let's publish a message to the subscribed topic
@@ -35,7 +33,7 @@ client.subscribeCompleteHandler(function (h) {
3533
});
3634

3735
// handle response on unsubscribe request
38-
client.unsubscribeCompleteHandler(function (h) {
36+
client.unsubscribeCompletionHandler(function (h) {
3937
console.log("Receive UNSUBACK from server");
4038
vertx.setTimer(5000, function (l) {
4139
client.disconnect(function (d, d_err) {
@@ -45,7 +43,7 @@ client.unsubscribeCompleteHandler(function (h) {
4543
});
4644

4745
// connect to a server
48-
client.connect(function (ch, ch_err) {
46+
client.connect(BROKER_PORT, BROKER_HOST, function (ch, ch_err) {
4947
if (ch_err == null) {
5048
console.log("Connected to a server");
5149
client.subscribe(MQTT_TOPIC, 0);

mqtt-examples/src/main/js/io/vertx/example/mqtt/app/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ mqttServer.endpointHandler(function (endpoint) {
4343

4444
endpoint.publishRelease(messageId);
4545

46-
}).publishCompleteHandler(function (messageId) {
46+
}).publishCompletionHandler(function (messageId) {
4747

4848
console.log("Received ack for message = " + messageId);
4949
});

mqtt-examples/src/main/js/io/vertx/example/mqtt/simple/client.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,9 @@ var MQTT_MESSAGE = "Hello Vert.x MQTT Client";
44
var BROKER_HOST = "localhost";
55
var BROKER_PORT = 1883;
66
var MQTT_TOPIC = "/my_topic";
7-
var options = {
8-
"port" : BROKER_PORT,
9-
"host" : BROKER_HOST
10-
};
7+
var mqttClient = MqttClient.create(vertx);
118

12-
var mqttClient = MqttClient.create(vertx, options);
13-
14-
mqttClient.connect(function (ch, ch_err) {
9+
mqttClient.connect(BROKER_PORT, BROKER_HOST, function (ch, ch_err) {
1510
if (ch_err == null) {
1611
console.log("Connected to a server");
1712

mqtt-examples/src/main/js/io/vertx/example/mqtt/ssl/client.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ var BROKER_PORT = 8883;
66
var MQTT_TOPIC = "/my_topic";
77
var options = {
88
};
9-
options.port = BROKER_PORT;
10-
options.host = BROKER_HOST;
119
options.ssl = true;
1210
options.trustAll = true;
1311

1412
var mqttClient = MqttClient.create(vertx, options);
1513

16-
mqttClient.connect(function (ch, ch_err) {
14+
mqttClient.connect(BROKER_PORT, BROKER_HOST, function (ch, ch_err) {
1715
if (ch_err == null) {
1816
console.log("Connected to a server");
1917

mqtt-examples/src/main/kotlin/io/vertx/example/mqtt/app/Client.kt

+4-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ import io.vertx.mqtt.MqttClientOptions
1010
class Client : io.vertx.core.AbstractVerticle() {
1111
var MQTT_MESSAGE = "Hello Vert.x MQTT Client"
1212
var BROKER_HOST = "localhost"
13-
var BROKER_PORT = 1883
1413
var MQTT_TOPIC = "/my_topic"
14+
var BROKER_PORT = 1883
1515
override fun start() {
1616
var options = MqttClientOptions(
17-
port = BROKER_PORT,
18-
host = BROKER_HOST,
1917
keepAliveTimeSeconds = 2)
2018

2119
var client = MqttClient.create(Vertx.vertx(), options)
@@ -27,7 +25,7 @@ class Client : io.vertx.core.AbstractVerticle() {
2725
})
2826

2927
// handle response on subscribe request
30-
client.subscribeCompleteHandler({ h ->
28+
client.subscribeCompletionHandler({ h ->
3129
println("Receive SUBACK from server with granted QoS : ${h.grantedQoSLevels()}")
3230

3331
// let's publish a message to the subscribed topic
@@ -42,7 +40,7 @@ class Client : io.vertx.core.AbstractVerticle() {
4240
})
4341

4442
// handle response on unsubscribe request
45-
client.unsubscribeCompleteHandler({ h ->
43+
client.unsubscribeCompletionHandler({ h ->
4644
println("Receive UNSUBACK from server")
4745
vertx.setTimer(5000, { l ->
4846
client.disconnect({ d ->
@@ -52,7 +50,7 @@ class Client : io.vertx.core.AbstractVerticle() {
5250
})
5351

5452
// connect to a server
55-
client.connect({ ch ->
53+
client.connect(BROKER_PORT, BROKER_HOST, { ch ->
5654
if (ch.succeeded()) {
5755
println("Connected to a server")
5856
client.subscribe(MQTT_TOPIC, 0)

mqtt-examples/src/main/kotlin/io/vertx/example/mqtt/app/Server.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Server : io.vertx.core.AbstractVerticle() {
4949

5050
endpoint.publishRelease(messageId)
5151

52-
}).publishCompleteHandler({ messageId ->
52+
}).publishCompletionHandler({ messageId ->
5353

5454
println("Received ack for message = ${messageId}")
5555
})

mqtt-examples/src/main/kotlin/io/vertx/example/mqtt/simple/Client.kt

+2-8
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,17 @@ package io.vertx.example.mqtt.simple
22

33
import io.netty.handler.codec.mqtt.MqttQoS
44
import io.vertx.core.buffer.Buffer
5-
import io.vertx.kotlin.mqtt.*
65
import io.vertx.mqtt.MqttClient
7-
import io.vertx.mqtt.MqttClientOptions
86

97
class Client : io.vertx.core.AbstractVerticle() {
108
var MQTT_MESSAGE = "Hello Vert.x MQTT Client"
119
var BROKER_HOST = "localhost"
1210
var BROKER_PORT = 1883
1311
var MQTT_TOPIC = "/my_topic"
1412
override fun start() {
15-
var options = MqttClientOptions(
16-
port = BROKER_PORT,
17-
host = BROKER_HOST)
13+
var mqttClient = MqttClient.create(vertx)
1814

19-
var mqttClient = MqttClient.create(vertx, options)
20-
21-
mqttClient.connect({ ch ->
15+
mqttClient.connect(BROKER_PORT, BROKER_HOST, { ch ->
2216
if (ch.succeeded()) {
2317
println("Connected to a server")
2418

mqtt-examples/src/main/kotlin/io/vertx/example/mqtt/ssl/Client.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ class Client : io.vertx.core.AbstractVerticle() {
1313
var MQTT_TOPIC = "/my_topic"
1414
override fun start() {
1515
var options = MqttClientOptions()
16-
options.port = BROKER_PORT
17-
options.host = BROKER_HOST
1816
options.ssl = true
1917
options.trustAll = true
2018

2119
var mqttClient = MqttClient.create(vertx, options)
2220

23-
mqttClient.connect({ ch ->
21+
mqttClient.connect(BROKER_PORT, BROKER_HOST, { ch ->
2422
if (ch.succeeded()) {
2523
println("Connected to a server")
2624

mqtt-examples/src/main/ruby/io/vertx/example/mqtt/app/client.rb

+4-6
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
require 'vertx/buffer'
44
@MQTT_MESSAGE = "Hello Vert.x MQTT Client"
55
@BROKER_HOST = "localhost"
6-
@BROKER_PORT = 1883
76
@MQTT_TOPIC = "/my_topic"
7+
@BROKER_PORT = 1883
88
options = {
9-
'port' => @BROKER_PORT,
10-
'host' => @BROKER_HOST,
119
'keepAliveTimeSeconds' => 2
1210
}
1311

@@ -20,7 +18,7 @@
2018
}
2119

2220
# handle response on subscribe request
23-
client.subscribe_complete_handler() { |h|
21+
client.subscribe_completion_handler() { |h|
2422
puts "Receive SUBACK from server with granted QoS : #{h.granted_qo_s_levels()}"
2523

2624
# let's publish a message to the subscribed topic
@@ -35,7 +33,7 @@
3533
}
3634

3735
# handle response on unsubscribe request
38-
client.unsubscribe_complete_handler() { |h|
36+
client.unsubscribe_completion_handler() { |h|
3937
puts "Receive UNSUBACK from server"
4038
$vertx.set_timer(5000) { |l|
4139
client.disconnect() { |d_err,d|
@@ -45,7 +43,7 @@
4543
}
4644

4745
# connect to a server
48-
client.connect() { |ch_err,ch|
46+
client.connect(@BROKER_PORT, @BROKER_HOST) { |ch_err,ch|
4947
if (ch_err == nil)
5048
puts "Connected to a server"
5149
client.subscribe(@MQTT_TOPIC, 0)

mqtt-examples/src/main/ruby/io/vertx/example/mqtt/app/server.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
endpoint.publish_release(messageId)
4545

46-
}.publish_complete_handler() { |messageId|
46+
}.publish_completion_handler() { |messageId|
4747

4848
puts "Received ack for message = #{messageId}"
4949
}

mqtt-examples/src/main/ruby/io/vertx/example/mqtt/simple/client.rb

+2-7
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,9 @@
44
@BROKER_HOST = "localhost"
55
@BROKER_PORT = 1883
66
@MQTT_TOPIC = "/my_topic"
7-
options = {
8-
'port' => @BROKER_PORT,
9-
'host' => @BROKER_HOST
10-
}
11-
12-
mqttClient = VertxMqttServer::MqttClient.create($vertx, options)
7+
mqttClient = VertxMqttServer::MqttClient.create($vertx)
138

14-
mqttClient.connect() { |ch_err,ch|
9+
mqttClient.connect(@BROKER_PORT, @BROKER_HOST) { |ch_err,ch|
1510
if (ch_err == nil)
1611
puts "Connected to a server"
1712

mqtt-examples/src/main/ruby/io/vertx/example/mqtt/ssl/client.rb

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@
66
@MQTT_TOPIC = "/my_topic"
77
options = {
88
}
9-
options['port'] = @BROKER_PORT
10-
options['host'] = @BROKER_HOST
119
options['ssl'] = true
1210
options['trustAll'] = true
1311

1412
mqttClient = VertxMqttServer::MqttClient.create($vertx, options)
1513

16-
mqttClient.connect() { |ch_err,ch|
14+
mqttClient.connect(@BROKER_PORT, @BROKER_HOST) { |ch_err,ch|
1715
if (ch_err == nil)
1816
puts "Connected to a server"
1917

service-proxy-examples/service-provider/src/main/generated/io/vertx/examples/service/rxjava/ProcessorService.java

+18
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,24 @@
3434
@io.vertx.lang.rxjava.RxGen(io.vertx.examples.service.ProcessorService.class)
3535
public class ProcessorService {
3636

37+
@Override
38+
public String toString() {
39+
return delegate.toString();
40+
}
41+
42+
@Override
43+
public boolean equals(Object o) {
44+
if (this == o) return true;
45+
if (o == null || getClass() != o.getClass()) return false;
46+
ProcessorService that = (ProcessorService) o;
47+
return delegate.equals(that.delegate);
48+
}
49+
50+
@Override
51+
public int hashCode() {
52+
return delegate.hashCode();
53+
}
54+
3755
public static final io.vertx.lang.rxjava.TypeArg<ProcessorService> __TYPE_ARG = new io.vertx.lang.rxjava.TypeArg<>(
3856
obj -> new ProcessorService((io.vertx.examples.service.ProcessorService) obj),
3957
ProcessorService::getDelegate

web-examples/src/main/groovy/io/vertx/example/web/oauth2/server.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import io.vertx.ext.web.handler.UserSessionHandler
88
import io.vertx.ext.web.handler.OAuth2AuthHandler
99
import io.vertx.ext.auth.oauth2.AccessToken
1010
import io.vertx.ext.web.templ.HandlebarsTemplateEngine
11-
@Field def CLIENT_SECRET = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
12-
@Field def CLIENT_ID = "xxxxxxxxxxxxxxxxxxxx"
11+
@Field def CLIENT_SECRET = "3155eafd33fc947e0fe9f44127055ce1fe876704"
12+
@Field def CLIENT_ID = "57cdaa1952a3f4ee3df8"
1313
@Field def engine = HandlebarsTemplateEngine.create()
1414
// To simplify the development of the web components we use a Router to route all HTTP requests
1515
// to organize our code in a reusable way.

web-examples/src/main/groovy/io/vertx/example/web/oauth2/views/advanced.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{{#if userInfo.private_emails}}
1313
With your permission, we were also able to dig up your private email addresses:
1414
{{#each userInfo.private_emails}}
15-
{{email}},
15+
{{email}}{{#unless @last}},{{/unless}}
1616
{{/each}}
1717
{{else}}
1818
Also, you're a bit secretive about your private email addresses.

web-examples/src/main/js/io/vertx/example/web/oauth2/server.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ var UserSessionHandler = require("vertx-web-js/user_session_handler");
77
var OAuth2AuthHandler = require("vertx-web-js/o_auth2_auth_handler");
88
var AccessToken = require("vertx-auth-oauth2-js/access_token");
99
var HandlebarsTemplateEngine = require("vertx-web-js/handlebars_template_engine");
10-
var CLIENT_SECRET = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
11-
var CLIENT_ID = "xxxxxxxxxxxxxxxxxxxx";
10+
var CLIENT_SECRET = "3155eafd33fc947e0fe9f44127055ce1fe876704";
11+
var CLIENT_ID = "57cdaa1952a3f4ee3df8";
1212
var engine = HandlebarsTemplateEngine.create();
1313
// To simplify the development of the web components we use a Router to route all HTTP requests
1414
// to organize our code in a reusable way.

0 commit comments

Comments
 (0)