mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-02-24 22:25:22 +00:00
版本更新至0.1.7,启用h2db,添加统计功能,框架优化
This commit is contained in:
19
parser/src/main/java/cn/qaiu/WebClientVertxInit.java
Normal file
19
parser/src/main/java/cn/qaiu/WebClientVertxInit.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package cn.qaiu;
|
||||
|
||||
import io.vertx.core.Vertx;
|
||||
|
||||
public class WebClientVertxInit {
|
||||
private Vertx vertx = null;
|
||||
private static final WebClientVertxInit INSTANCE = new WebClientVertxInit();
|
||||
|
||||
public static void init(Vertx vx) {
|
||||
INSTANCE.vertx = vx;
|
||||
}
|
||||
|
||||
public static Vertx get() {
|
||||
if (INSTANCE.vertx == null) {
|
||||
throw new IllegalArgumentException("VertxInit getVertx: vertx is null");
|
||||
}
|
||||
return INSTANCE.vertx;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user