Class ConnectionUtils

java.lang.Object
com.mikuac.shiro.common.utils.ConnectionUtils

public class ConnectionUtils extends Object
  • 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

      public static String getAuthorization(org.springframework.web.socket.WebSocketSession session)
    • checkToken

      public static boolean checkToken(org.springframework.web.socket.WebSocketSession session, String token)
      访问密钥检查
      Parameters:
      session - WebSocketSession
      Returns:
      是否验证通过
    • getAdapter

      public static AdapterEnum getAdapter(org.springframework.web.socket.WebSocketSession session)