Package com.mikuac.shiro.handler
Class WebSocketHandler
java.lang.Object
org.springframework.web.socket.handler.AbstractWebSocketHandler
org.springframework.web.socket.handler.TextWebSocketHandler
com.mikuac.shiro.handler.WebSocketHandler
- All Implemented Interfaces:
org.springframework.web.socket.WebSocketHandler
public class WebSocketHandler
extends org.springframework.web.socket.handler.TextWebSocketHandler
Created on 2021/7/16.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionWebSocketHandler(EventHandler eventHandler, BotFactory botFactory, ActionHandler actionHandler, ShiroAsyncTask shiroAsyncTask, BotContainer botContainer) 构造函数 -
Method Summary
Modifier and TypeMethodDescriptionvoidafterConnectionClosed(@NonNull org.springframework.web.socket.WebSocketSession session, @NonNull org.springframework.web.socket.CloseStatus status) voidafterConnectionEstablished(@NonNull org.springframework.web.socket.WebSocketSession session) getSessionStatus(org.springframework.web.socket.WebSocketSession session) protected voidhandleTextMessage(@NonNull org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message) voidsetCoreEvent(CoreEvent coreEvent) voidsetScheduledExecutorService(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor shiroTaskExecutor) static voidsetWaitWebsocketConnect(int time) voidsetWebSocketProperties(WebSocketProperties webSocketProperties) Methods inherited from class org.springframework.web.socket.handler.TextWebSocketHandler
handleBinaryMessageMethods inherited from class org.springframework.web.socket.handler.AbstractWebSocketHandler
handleMessage, handlePongMessage, handleTransportError, supportsPartialMessages
-
Constructor Details
-
WebSocketHandler
public WebSocketHandler(EventHandler eventHandler, BotFactory botFactory, ActionHandler actionHandler, ShiroAsyncTask shiroAsyncTask, BotContainer botContainer) 构造函数- Parameters:
eventHandler-EventHandlerbotFactory-BotFactoryactionHandler-ActionHandlershiroAsyncTask-ShiroAsyncTaskbotContainer-BotContainer
-
-
Method Details
-
setScheduledExecutorService
@Autowired public void setScheduledExecutorService(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor shiroTaskExecutor) -
setWebSocketProperties
-
setCoreEvent
-
afterConnectionEstablished
public void afterConnectionEstablished(@NonNull @NonNull org.springframework.web.socket.WebSocketSession session) - Specified by:
afterConnectionEstablishedin interfaceorg.springframework.web.socket.WebSocketHandler- Overrides:
afterConnectionEstablishedin classorg.springframework.web.socket.handler.AbstractWebSocketHandler
-
afterConnectionClosed
public void afterConnectionClosed(@NonNull @NonNull org.springframework.web.socket.WebSocketSession session, @NonNull @NonNull org.springframework.web.socket.CloseStatus status) - Specified by:
afterConnectionClosedin interfaceorg.springframework.web.socket.WebSocketHandler- Overrides:
afterConnectionClosedin classorg.springframework.web.socket.handler.AbstractWebSocketHandler
-
handleTextMessage
protected void handleTextMessage(@NonNull @NonNull org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message) - Overrides:
handleTextMessagein classorg.springframework.web.socket.handler.AbstractWebSocketHandler
-
getSessionStatus
public static WebSocketHandler.SessionStatus getSessionStatus(org.springframework.web.socket.WebSocketSession session) -
setWaitWebsocketConnect
public static void setWaitWebsocketConnect(int time)
-