Package com.mikuac.shiro.core
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.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBotFactory(ActionHandler actionHandler, ShiroProperties shiroProps, org.springframework.context.ApplicationContext applicationContext) -
Method Summary
Modifier and TypeMethodDescriptioncreateBot(long selfId, org.springframework.web.socket.WebSocketSession session) 创建Bot对象voidonApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
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:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
-
createBot
创建Bot对象- Parameters:
selfId- 机器人账号session-WebSocketSession- Returns:
Bot
-