This commit is contained in:
redkale
2024-10-14 08:50:17 +08:00
parent 4e2ba22fc3
commit 4d17fe7e3f
2 changed files with 2 additions and 48 deletions

View File

@@ -42,12 +42,12 @@ public class NodeHttpServer extends NodeServer {
protected ClassFilter<? extends WebSocket> webSocketFilter; protected ClassFilter<? extends WebSocket> webSocketFilter;
public NodeHttpServer(Application application, AnyValue serconf) { public NodeHttpServer(Application application, AnyValue serconf) {
super(application, createServer(application, serconf)); super(application, createServer(application));
this.httpServer = (HttpServer) server; this.httpServer = (HttpServer) server;
this.rest = serconf != null && serconf.getAnyValue("rest") != null; this.rest = serconf != null && serconf.getAnyValue("rest") != null;
} }
private static Server createServer(Application application, AnyValue serconf) { private static Server createServer(Application application) {
return new HttpServer( return new HttpServer(
application, application,
application.getStartTime(), application.getStartTime(),

View File

@@ -1,46 +0,0 @@
/*
*
*/
package org.redkale.util;
/**
* 简单的boolean值引用
*
* <p>详情见: https://redkale.org
*
* @author zhangjx
* @since 2.8.0
*/
public final class BoolRef {
private boolean value;
public BoolRef(boolean initialValue) {
this.value = initialValue;
}
public BoolRef() {}
public boolean get() {
return this.value;
}
public void set(boolean newValue) {
this.value = newValue;
}
public BoolRef asFalse() {
this.value = false;
return this;
}
public BoolRef asTrue() {
this.value = true;
return this;
}
@Override
public String toString() {
return String.valueOf(this.value);
}
}