-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vertx web - make hot replacement work
- Loading branch information
Showing
12 changed files
with
578 additions
and
494 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
174 changes: 0 additions & 174 deletions
174
...s/vertx-web/runtime/src/main/java/io/quarkus/vertx/web/runtime/HttpServerInitializer.java
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
extensions/vertx-web/runtime/src/main/java/io/quarkus/vertx/web/runtime/RouterProducer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package io.quarkus.vertx.web.runtime; | ||
|
||
import javax.enterprise.context.ApplicationScoped; | ||
import javax.enterprise.inject.Produces; | ||
import javax.inject.Singleton; | ||
|
||
import io.vertx.ext.web.Router; | ||
|
||
@Singleton | ||
public class RouterProducer { | ||
|
||
private volatile Router router; | ||
|
||
void initialize(Router router) { | ||
this.router = router; | ||
} | ||
|
||
// Note that we need a client proxy because if a bean also @Observes Router a null value would be injected | ||
@ApplicationScoped | ||
@Produces | ||
Router produceRouter() { | ||
return router; | ||
} | ||
|
||
@ApplicationScoped | ||
@Produces | ||
io.vertx.reactivex.ext.web.Router produceRxRouter() { | ||
return io.vertx.reactivex.ext.web.Router.newInstance(router); | ||
} | ||
|
||
} |
Oops, something went wrong.