public class BotRuntime extends Object
应当于启动初期就初始化的运行期间的信息,启动后进行初始化并注入至依赖中心。运行期间, 内部所使用的实例应当只存在一个实例。可以对其进行覆盖,来实现分布式的登录信息同步。可以预见的,这个类会在后续的版本更新中被频繁更改。
Modifier and Type | Method and Description |
---|---|
BotManager |
getBotManager()
获取BotManager
|
BaseConfiguration |
getConfiguration() |
DependCenter |
getDependCenter() |
protected QQLogLang |
getLog()
获取语言日志对象,语言在此类实例化结束后应当已经初始化完毕。
|
static BotRuntime |
getRuntime()
获取Runtime,如果尚未初始化则抛出异常。
|
static BotRuntime |
initRuntime(Collection<ListenerInfo> listenerInfos,
BaseConfiguration configuration,
DependCenter dependCenter,
BotManager botManager) |
static BotRuntime |
initRuntime(Collection<ListenerInfo> listenerInfos,
BotInfo[] botInfos,
BaseConfiguration configuration,
DependCenter dependCenter,
Supplier<BotManager> botManagerSupplier)
初始化runtime对象
|
protected QQLogLang getLog()
public static BotRuntime initRuntime(Collection<ListenerInfo> listenerInfos, BaseConfiguration configuration, DependCenter dependCenter, BotManager botManager)
public static BotRuntime initRuntime(Collection<ListenerInfo> listenerInfos, BotInfo[] botInfos, BaseConfiguration configuration, DependCenter dependCenter, Supplier<BotManager> botManagerSupplier)
public static BotRuntime getRuntime()
public BotManager getBotManager()
public BaseConfiguration getConfiguration()
public DependCenter getDependCenter()
Copyright © 2020. All rights reserved.