程序包 cool.scx.ext.ws
类 WSContext
java.lang.Object
cool.scx.ext.ws.WSContext
WSContext class.
- 版本:
- 1.15.0
- 作者:
- scx567888
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static Collection<io.vertx.core.http.ServerWebSocket>获取当前所有在线的连接对象static <T> WSEventBuswsConsumer(String address, Consumer<WSMessage<T>> handler) wsConsumer.static WSEventBuswsEventBus.static WSEventBuswsPublish.static WSEventBuswsPublish(WSMessage<?> wsMessage, Collection<io.vertx.core.http.ServerWebSocket> sockets) wsPublish.static WSEventBuswsPublish.static WSEventBuswsPublish(String address, Object body, Collection<io.vertx.core.http.ServerWebSocket> sockets) wsPublish.static WSEventBuswsPublishAll(WSMessage<?> wsMessage) wsPublishAll.static WSEventBuswsPublishAll(String address, Object body) wsPublishAll.
-
构造器详细资料
-
WSContext
public WSContext()
-
-
方法详细资料
-
wsEventBus
wsEventBus.
- 返回:
- a
WSEventBusobject
-
wsConsumer
wsConsumer.
- 类型参数:
T- a T class- 参数:
address- aStringobjecthandler- aConsumerobject- 返回:
- a
WSEventBusobject
-
wsPublish
public static WSEventBus wsPublish(WSMessage<?> wsMessage, io.vertx.core.http.ServerWebSocket... sockets) wsPublish.
- 参数:
wsMessage- aWSMessageobjectsockets- aServerWebSocketobject- 返回:
- a
WSEventBusobject
-
wsPublish
public static WSEventBus wsPublish(String address, Object body, io.vertx.core.http.ServerWebSocket... sockets) wsPublish.
- 参数:
address- aStringobjectbody- aObjectobjectsockets- aCollectionobject- 返回:
- a
WSEventBusobject
-
wsPublish
public static WSEventBus wsPublish(WSMessage<?> wsMessage, Collection<io.vertx.core.http.ServerWebSocket> sockets) wsPublish.
- 参数:
wsMessage- aWSMessageobjectsockets- aCollectionobject- 返回:
- a
WSEventBusobject
-
wsPublish
public static WSEventBus wsPublish(String address, Object body, Collection<io.vertx.core.http.ServerWebSocket> sockets) wsPublish.
- 参数:
address- aStringobjectbody- aObjectobjectsockets- aCollectionobject- 返回:
- a
WSEventBusobject
-
wsPublishAll
wsPublishAll.
- 参数:
wsMessage- aWSMessageobject- 返回:
- a
WSEventBusobject
-
wsPublishAll
wsPublishAll.
- 参数:
address- aStringobjectbody- aObjectobject- 返回:
- a
WSEventBusobject
-
onlineClients
获取当前所有在线的连接对象- 返回:
- 当前所有在线的连接对象
-