- java.lang.Object
-
- org.redkale.net.http.WebSocketEngine
-
public class WebSocketEngine extends Object
详情见: https://redkale.org- 作者:
- zhangjx
-
-
字段概要
字段 修饰符和类型 字段 说明 protected HttpContext
context
protected Cryptor
cryptor
protected AtomicInteger
currConns
protected int
liveInterval
protected Logger
logger
protected WebSocketNode
node
protected Convert
sendConvert
protected boolean
single
protected int
wsMaxBody
protected int
wsMaxConns
protected int
wsThreads
-
构造器概要
构造器 限定符 构造器 说明 protected
WebSocketEngine(String engineid, boolean single, HttpContext context, int liveInterval, int wsMaxConns, int wsThreads, int wsMaxBody, Cryptor cryptor, WebSocketNode node, Convert sendConvert, Logger logger)
-
方法概要
-
-
-
字段详细资料
-
node
@Comment("\u5f53\u524dWebSocket\u5bf9\u5e94\u7684Node") protected final WebSocketNode node
-
context
protected final HttpContext context
-
sendConvert
protected final Convert sendConvert
-
single
@Comment("\u662f\u5426\u5355\u7528\u6237\u5355\u8fde\u63a5") protected final boolean single
-
currConns
@Comment("\u5f53\u524d\u8fde\u63a5\u6570") protected final AtomicInteger currConns
-
liveInterval
@Comment("PING\u7684\u95f4\u9694\u79d2\u6570") protected int liveInterval
-
wsMaxConns
@Comment("\u6700\u5927\u8fde\u63a5\u6570, \u4e3a0\u8868\u793a\u65e0\u9650\u5236") protected int wsMaxConns
-
wsThreads
@Comment("\u64cd\u4f5cWebSocketNode\u5bf9\u5e94CacheSource\u5e76\u53d1\u6570, \u4e3a-1\u8868\u793a\u65e0\u9650\u5236\uff0c\u4e3a0\u8868\u793a\u7cfb\u7edf\u9ed8\u8ba4\u503c(CPU*8)") protected int wsThreads
-
wsMaxBody
@Comment("\u6700\u5927\u6d88\u606f\u4f53\u957f\u5ea6, \u5c0f\u4e8e1\u8868\u793a\u65e0\u9650\u5236") protected int wsMaxBody
-
-
构造器详细资料
-
WebSocketEngine
protected WebSocketEngine(String engineid, boolean single, HttpContext context, int liveInterval, int wsMaxConns, int wsThreads, int wsMaxBody, Cryptor cryptor, WebSocketNode node, Convert sendConvert, Logger logger)
-
-
方法详细资料
-
forceCloseLocalWebSocket
@Comment("\u5f3a\u5236\u5173\u95ed\u672c\u5730\u7528\u6237\u7684WebSocket") public int forceCloseLocalWebSocket(Serializable userid)
-
broadcastLocalMessage
@Comment("\u7ed9\u6240\u6709\u8fde\u63a5\u7528\u6237\u53d1\u9001\u6d88\u606f") public CompletableFuture<Integer> broadcastLocalMessage(Object message, boolean last)
-
broadcastLocalMessage
@Comment("\u7ed9\u6307\u5b9aWebSocket\u8fde\u63a5\u7528\u6237\u53d1\u9001\u6d88\u606f") public CompletableFuture<Integer> broadcastLocalMessage(WebSocketRange wsrange, Object message, boolean last)
-
broadcastLocalMessage
@Comment("\u7ed9\u6307\u5b9aWebSocket\u8fde\u63a5\u7528\u6237\u53d1\u9001\u6d88\u606f") public CompletableFuture<Integer> broadcastLocalMessage(Predicate<WebSocket> predicate, Object message, boolean last)
-
sendLocalMessage
@Comment("\u7ed9\u6307\u5b9a\u7528\u6237\u7ec4\u53d1\u9001\u6d88\u606f") public CompletableFuture<Integer> sendLocalMessage(Object message, boolean last, Stream<? extends Serializable> userids)
-
sendLocalMessage
@Comment("\u7ed9\u6307\u5b9a\u7528\u6237\u7ec4\u53d1\u9001\u6d88\u606f") public CompletableFuture<Integer> sendLocalMessage(Object message, boolean last, Serializable... userids)
-
broadcastLocalAction
@Comment("\u7ed9\u6307\u5b9aWebSocket\u8fde\u63a5\u7528\u6237\u53d1\u8d77\u64cd\u4f5c\u6307\u4ee4") public CompletableFuture<Integer> broadcastLocalAction(WebSocketAction action)
-
sendLocalAction
@Comment("\u7ed9\u6307\u5b9a\u7528\u6237\u7ec4\u53d1\u9001\u64cd\u4f5c") public CompletableFuture<Integer> sendLocalAction(WebSocketAction action, Stream<? extends Serializable> userids)
-
sendLocalAction
@Comment("\u7ed9\u6307\u5b9a\u7528\u6237\u7ec4\u53d1\u9001\u64cd\u4f5c") public CompletableFuture<Integer> sendLocalAction(WebSocketAction action, Serializable... userids)
-
getWebSocketNode
@Comment("\u83b7\u53d6WebSocketNode\u5bf9\u8c61") public WebSocketNode getWebSocketNode()
-
getLocalWsMaxConns
@Comment("\u83b7\u53d6\u6700\u5927\u8fde\u63a5\u6570") public int getLocalWsMaxConns()
-
isLocalConnLimited
@Comment("\u8fde\u63a5\u6570\u662f\u5426\u8fbe\u5230\u4e0a\u9650") public boolean isLocalConnLimited()
-
getLocalWebSockets
@Comment("\u83b7\u53d6\u6240\u6709\u8fde\u63a5") public Collection<WebSocket> getLocalWebSockets()
-
forEachLocalWebSocket
@Comment("\u83b7\u53d6\u6240\u6709\u8fde\u63a5") public void forEachLocalWebSocket(Consumer<WebSocket> consumer)
-
getLocalWebSocketSize
@Comment("\u83b7\u53d6\u5f53\u524d\u8fde\u63a5\u603b\u6570") public int getLocalWebSocketSize()
-
getLocalUserSet
@Comment("\u83b7\u53d6\u5f53\u524d\u7528\u6237\u603b\u6570") public Set<Serializable> getLocalUserSet()
-
getLocalUserSize
@Comment("\u83b7\u53d6\u5f53\u524d\u7528\u6237\u603b\u6570") public int getLocalUserSize()
-
findLocalWebSocket
@Comment("\u9002\u7528\u4e8e\u5355\u7528\u6237\u5355\u8fde\u63a5\u6a21\u5f0f") public WebSocket findLocalWebSocket(Serializable userid)
-
getLocalWebSockets
@Comment("\u9002\u7528\u4e8e\u5355\u7528\u6237\u591a\u8fde\u63a5\u6a21\u5f0f") public Stream<WebSocket> getLocalWebSockets(Serializable userid)
-
existsLocalWebSocket
public boolean existsLocalWebSocket(Serializable userid)
-
getEngineid
public String getEngineid()
-
-