public abstract class WebSocketRouter extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
protected Chain<WebSocketFilter> |
webSocketFilterChain |
Constructor and Description |
---|
WebSocketRouter() |
Modifier and Type | Method and Description |
---|---|
WebSocketRouter |
addFilterChain(WebSocketFilter webSocketFilter) |
WebSocketRouter |
clearFilterChain() |
Chain<WebSocketFilter> |
getWebSocketFilterChain() |
abstract void |
onClose(WebSocketSession session)
websocket 关闭
|
abstract Object |
onOpen(WebSocketSession session)
websocket 连接打开
|
abstract Object |
onRecived(WebSocketSession session,
Object obj)
websocket 收到消息
|
abstract void |
onSent(WebSocketSession session,
Object obj)
websocket 消息发送完成
|
WebSocketRouter |
removeFilterChain(WebSocketFilter webSocketFilter) |
protected Chain<WebSocketFilter> webSocketFilterChain
public WebSocketRouter addFilterChain(WebSocketFilter webSocketFilter)
public WebSocketRouter clearFilterChain()
public WebSocketRouter removeFilterChain(WebSocketFilter webSocketFilter)
public Chain<WebSocketFilter> getWebSocketFilterChain()
public abstract Object onOpen(WebSocketSession session)
session
- WebSocket 会话public abstract Object onRecived(WebSocketSession session, Object obj)
session
- WebSocket 会话obj
- 收到的缓冲数据public abstract void onSent(WebSocketSession session, Object obj)
session
- WebSocket 会话obj
- 发送的消息public abstract void onClose(WebSocketSession session)
session
- WebSocket 会话Copyright © 2020 Voovan. All rights reserved.