This commit is contained in:
@@ -13,6 +13,7 @@ import java.security.*;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.logging.*;
|
import java.util.logging.*;
|
||||||
import javax.annotation.*;
|
import javax.annotation.*;
|
||||||
|
import org.redkale.service.WebSocketNodeService;
|
||||||
import org.redkale.util.*;
|
import org.redkale.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,6 +68,10 @@ public abstract class WebSocketServlet extends HttpServlet {
|
|||||||
public final void preInit(HttpContext context, AnyValue conf) {
|
public final void preInit(HttpContext context, AnyValue conf) {
|
||||||
InetSocketAddress addr = context.getServerAddress();
|
InetSocketAddress addr = context.getServerAddress();
|
||||||
this.engine = new WebSocketEngine(addr.getHostString() + ":" + addr.getPort() + "-[" + name() + "]", this.node, logger);
|
this.engine = new WebSocketEngine(addr.getHostString() + ":" + addr.getPort() + "-[" + name() + "]", this.node, logger);
|
||||||
|
if (this.node == null) {
|
||||||
|
this.node = new WebSocketNodeService();
|
||||||
|
if (logger.isLoggable(Level.INFO)) logger.info("not found WebSocketNode, create a default value for " + getClass().getName());
|
||||||
|
}
|
||||||
this.node.putWebSocketEngine(engine);
|
this.node.putWebSocketEngine(engine);
|
||||||
this.node.init(conf);
|
this.node.init(conf);
|
||||||
this.engine.init(conf);
|
this.engine.init(conf);
|
||||||
|
|||||||
Reference in New Issue
Block a user