Package com.mikuac.shiro.common.utils
Class ConnectionUtils
java.lang.Object
com.mikuac.shiro.common.utils.ConnectionUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckToken(org.springframework.web.socket.WebSocketSession session, String token) 访问密钥检查static AdapterEnumgetAdapter(org.springframework.web.socket.WebSocketSession session) static StringgetAuthorization(org.springframework.web.socket.WebSocketSession session) static SessionStatusEnumgetSessionStatus(org.springframework.web.socket.WebSocketSession session) static BothandleFirstConnect(long xSelfId, org.springframework.web.socket.WebSocketSession session, BotFactory botFactory, CoreEvent coreEvent, org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor shiroTaskExecutor) static voidhandleReConnect(Bot bot, long xSelfId, org.springframework.web.socket.WebSocketSession session) static longparseSelfId(org.springframework.web.socket.WebSocketSession session) 获取连接的 QQ 号
-
Method Details
-
getSessionStatus
public static SessionStatusEnum getSessionStatus(org.springframework.web.socket.WebSocketSession session) -
handleReConnect
public static void handleReConnect(Bot bot, long xSelfId, org.springframework.web.socket.WebSocketSession session) -
handleFirstConnect
public static Bot handleFirstConnect(long xSelfId, org.springframework.web.socket.WebSocketSession session, BotFactory botFactory, CoreEvent coreEvent, org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor shiroTaskExecutor) -
parseSelfId
public static long parseSelfId(org.springframework.web.socket.WebSocketSession session) 获取连接的 QQ 号- Parameters:
session-WebSocketSession- Returns:
- QQ 号
-
getAuthorization
-
checkToken
public static boolean checkToken(org.springframework.web.socket.WebSocketSession session, String token) 访问密钥检查- Parameters:
session- WebSocketSession- Returns:
- 是否验证通过
-
getAdapter
-