public class SimpleRobotContext<SEND extends SenderSendList,SET extends SenderSetList,GET extends SenderGetList,CONFIG extends BaseConfiguration,APPLICATION extends BaseApplication> extends Object implements Closeable
SimpleRobotContext, 在启动器执行run方法后所得到的结果组件开发者可以选择使用一个新的封装类来继承此类,也可以选择直接使用此类。其中也包括了:
BotManager
实例DependCenter
实例Closeable
接口Constructor and Description |
---|
SimpleRobotContext(SEND sender,
SET setter,
GET getter,
BotManager manager,
MsgParser msgParser,
MsgProcessor processor,
DependCenter dependCenter,
CONFIG configuration,
APPLICATION application)
构造函数
|
Modifier and Type | Method and Description |
---|---|
void |
close()
closeable
|
APPLICATION |
getApplication() |
BotManager |
getBotManager()
获取Bot管理器
|
CONFIG |
getConfiguration() |
DependCenter |
getDependCenter()
获取依赖管理中心
|
MsgParser |
getMsgParser()
获取监听消息字符串转化器
|
MsgProcessor |
getMsgProcessor()
获取监听消息执行处理器
|
public final SEND extends SenderSendList SENDER
public final SET extends SenderSetList SETTER
public final GET extends SenderGetList GETTER
public SimpleRobotContext(SEND sender, SET setter, GET getter, BotManager manager, MsgParser msgParser, MsgProcessor processor, DependCenter dependCenter, CONFIG configuration, APPLICATION application)
sender
- sender送信器setter
- setter送信器getter
- getter送信器manager
- 监听函数管理器msgParser
- 消息字符串转化器processor
- 监听消息执行器public BotManager getBotManager()
public MsgParser getMsgParser()
获取监听消息字符串转化器此函数可以通过接收一个监听函数的字符串,来转化为一个MsgGet
监听消息对象
public MsgProcessor getMsgProcessor()
获取监听消息执行处理器其可以通过接收一个MsgGet
监听消息对象,来对其进行处理,并获取监听回执对象(或数组)
public DependCenter getDependCenter()
public CONFIG getConfiguration()
public APPLICATION getApplication()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2020. All rights reserved.