Skip to content

Commit 83c72a4

Browse files
committed
Revert "Hook for VertxBuilder customization"
This reverts commit 3f930dc.
1 parent 3f930dc commit 83c72a4

File tree

2 files changed

+9
-24
lines changed

2 files changed

+9
-24
lines changed

src/main/java/io/vertx/core/impl/launcher/VertxLifecycleHooks.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
import io.vertx.core.DeploymentOptions;
1515
import io.vertx.core.Vertx;
1616
import io.vertx.core.VertxOptions;
17-
import io.vertx.core.impl.VertxBuilder;
1817
import io.vertx.core.json.JsonObject;
19-
import io.vertx.core.spi.tracing.VertxTracer;
2018

2119
/**
2220
* Interface that let sub-classes of launcher to be notified on different events.
@@ -33,18 +31,6 @@ public interface VertxLifecycleHooks {
3331
*/
3432
void afterConfigParsed(JsonObject config);
3533

36-
/**
37-
* Default implementation for the {@link VertxBuilder} creation.
38-
* <p>
39-
* This can be overridden in order to customize, for example, the tracer, with {@link VertxBuilder#tracer(VertxTracer)}.
40-
*
41-
* @param config the Vert.x options to use, in JSON format
42-
* @return the Vert.x builder instance
43-
*/
44-
default VertxBuilder createVertxBuilder(JsonObject config) {
45-
return config == null ? new VertxBuilder() : new VertxBuilder(config);
46-
}
47-
4834
/**
4935
* Hook for sub-classes of the {@link io.vertx.core.Launcher} class before the vertx instance is started. Options
5036
* can still be updated.

src/main/java/io/vertx/core/impl/launcher/commands/BareCommand.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,15 @@ public void run(Runnable action) {
201201
protected Vertx startVertx() {
202202
JsonObject optionsJson = getJsonFromFileOrString(vertxOptions, "options");
203203

204-
EventBusOptions eventBusOptions = optionsJson == null ? getEventBusOptions() : getEventBusOptions(optionsJson.getJsonObject("eventBusOptions"));
205-
VertxBuilder builder = createVertxBuilder(optionsJson);
204+
EventBusOptions eventBusOptions;
205+
VertxBuilder builder;
206+
if (optionsJson == null) {
207+
eventBusOptions = getEventBusOptions();
208+
builder = new VertxBuilder();
209+
} else {
210+
eventBusOptions = getEventBusOptions(optionsJson.getJsonObject("eventBusOptions"));
211+
builder = new VertxBuilder(optionsJson);
212+
}
206213
options = builder.options();
207214
options.setEventBusOptions(eventBusOptions);
208215

@@ -331,14 +338,6 @@ protected void beforeStartingVertx(VertxOptions options) {
331338
}
332339
}
333340

334-
protected VertxBuilder createVertxBuilder(JsonObject config) {
335-
Object main = executionContext.main();
336-
if (main instanceof VertxLifecycleHooks) {
337-
return ((VertxLifecycleHooks) main).createVertxBuilder(config);
338-
}
339-
return new VertxBuilder(config);
340-
}
341-
342341
/**
343342
* @return the event bus options.
344343
*/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy