Class BotFactory

java.lang.Object
com.mikuac.shiro.core.BotFactory
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>

@Component public class BotFactory extends Object implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
Created on 2021/7/7.
  • Constructor Details

    • BotFactory

      @Autowired public BotFactory(ActionHandler actionHandler, ShiroProperties shiroProps, org.springframework.context.ApplicationContext applicationContext)
  • Method Details

    • onApplicationEvent

      public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
    • createBot

      public Bot createBot(long selfId, org.springframework.web.socket.WebSocketSession session)
      创建Bot对象
      Parameters:
      selfId - 机器人账号
      session - WebSocketSession
      Returns:
      Bot