Package | Description |
---|---|
com.forte.qqrobot |
主要是core所需要的包
|
com.forte.qqrobot.beans.function | |
com.forte.qqrobot.beans.messages.msgget | |
com.forte.qqrobot.beans.messages.types | |
com.forte.qqrobot.beans.types | |
com.forte.qqrobot.factory |
此包下定义部分工厂,目前为用于注册枚举类型的工厂。
所有的枚举工厂都十分不稳定。
|
com.forte.qqrobot.listener | |
com.forte.qqrobot.listener.error | |
com.forte.qqrobot.listener.invoker | |
com.forte.qqrobot.test | |
com.forte.qqrobot.utils |
Modifier and Type | Method and Description |
---|---|
protected abstract MsgGet |
BaseApplication.msgParse(String str)
字符串转化为MsgGet的方法,最终会被转化为
MsgParser 函数,
会作为参数传入BaseApplication.runServer(DependCenter, ListenerManager, MsgProcessor, MsgParser) , 也会封装进SimpleRobotContext 中 |
MsgGet |
MsgParser.parse(String msg)
将一个从插件那里得到的监听消息的原始字符串转化为一个对应的消息封装类。
|
Modifier and Type | Method and Description |
---|---|
protected Function<MsgGet,RootSenderList> |
BaseApplication.getRootSenderFunction(BotManager botManager)
根据
BaseApplication.getSender(MsgGet, BotManager) , BaseApplication.getSetter(MsgGet, BotManager) , BaseApplication.getGetter(MsgGet, BotManager) 三个函数构建一个RootSenderList
参数分别为一个BotManager和一个MsgGet对象
如果组件不是分为三个部分而构建,则可以考虑重写此函数
此函数最终会被送入组件实现的runServer中 |
Modifier and Type | Method and Description |
---|---|
protected abstract GET |
BaseApplication.getGetter(MsgGet msgGet,
BotManager botManager)
提供一个msgGet,将其转化为GetList
|
protected abstract SEND |
BaseApplication.getSender(MsgGet msgGet,
BotManager botManager)
提供一个msgGet,将其转化为SendList
|
protected abstract SET |
BaseApplication.getSetter(MsgGet msgGet,
BotManager botManager)
提供一个msgGet,将其转化为SetList
|
ListenResult[] |
MsgProcessor.onMsg(MsgGet msgGet)
处理监听消息
|
ListenResult[] |
MsgProcessable.onMsg(MsgGet msgGet)
监听一个消息,返回监听响应结果集
|
ListenResult |
MsgProcessor.onMsgSelected(MsgGet msgGet)
经过筛选后的响应集
|
Constructor and Description |
---|
MsgProcessor(ResultSelectType selectType,
ListenerManager listenerManager,
Function<MsgGet,RootSenderList> rootSenderFunc)
构造
|
MsgProcessor(ResultSelectType selectType,
ListenerManager listenerManager,
Function<MsgGet,SenderSendList> senderFunc,
Function<MsgGet,SenderSetList> setterFunc,
Function<MsgGet,SenderGetList> getterFunc)
构造
|
MsgProcessor(ResultSelectType selectType,
ListenerManager listenerManager,
Function<MsgGet,SenderSendList> senderFunc,
Function<MsgGet,SenderSetList> setterFunc,
Function<MsgGet,SenderGetList> getterFunc)
构造
|
MsgProcessor(ResultSelectType selectType,
ListenerManager listenerManager,
Function<MsgGet,SenderSendList> senderFunc,
Function<MsgGet,SenderSetList> setterFunc,
Function<MsgGet,SenderGetList> getterFunc)
构造
|
Modifier and Type | Method and Description |
---|---|
boolean |
MostDIYTypeFilter.test(Filter filter,
MsgGet msg,
AtDetection at,
ListenContext context,
Filterable[] filters) |
Modifier and Type | Interface and Description |
---|---|
interface |
DiscussMsg
讨论组消息
|
interface |
EventGet
事件接收的接口
|
interface |
FriendAdd
好友已经添加事件
|
interface |
FriendAddRequest
好友添加申请事件
|
interface |
GroupAddRequest
群添加请求事件
|
interface |
GroupAdminChange
群管理员变动事件
|
interface |
GroupBan
群禁言事件
|
interface |
GroupFileUpload
群文件上传事件
|
interface |
GroupMemberIncrease
群成员增加
|
interface |
GroupMemberReduce
群成员减少事件
|
interface |
GroupMsg
群消息
|
interface |
GroupMsgDelete
群消息撤回事件
|
interface |
PrivateMsg
私信消息
|
interface |
PrivateMsgDelete
私信消息撤回
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractDiscussMsg
DiscussMsg对应的抽象类
|
class |
AbstractEventGet
EventGet对应抽象实现
|
class |
AbstractFriendAdd |
class |
AbstractFriendAddRequest
FriendAddRequest对应抽象类
|
class |
AbstractGroupAddRequest
GroupAddRequest 对应抽象类
|
class |
AbstractGroupAdminChange
GroupAdminChange 对应抽象类
|
class |
AbstractGroupBan
群禁言事件对应抽象类
|
class |
AbstractGroupFileUpload
GroupFileUpload对应抽象类
|
class |
AbstractGroupMemberIncrease
GroupMemberIncrease 对应抽象类
|
class |
AbstractGroupMemberReduce
GroupMemberReduce对应抽象类
|
class |
AbstractGroupMsg
GroupMsg 对应抽象类
|
class |
AbstractMsgGet
接口
MsgGet 对应的抽象类 |
class |
AbstractPrivateMsg
PrivateMsg接口的抽象类
|
Modifier and Type | Method and Description |
---|---|
Class<? extends MsgGet> |
MsgGetTypes.getBeanClass()
获取此类型对应的class对象
|
Modifier and Type | Method and Description |
---|---|
static MsgGetTypes |
MsgGetTypes.getByType(MsgGet msgGet)
通过MsgGet对象获取枚举对象
|
Modifier and Type | Method and Description |
---|---|
static MsgGetTypes |
MsgGetTypes.getByType(Class<? extends MsgGet> clazz)
通过class对象获取枚举对象
|
Modifier and Type | Method and Description |
---|---|
boolean |
MostDIYType.test(Filter filter,
MsgGet msgGet,
AtDetection at,
ListenContext context,
Filterable[] filters) |
Modifier and Type | Method and Description |
---|---|
MsgGetTypes |
MsgGetTypeFactory.register(String name,
Class<? extends MsgGet> listenType)
获取一个MsgGetType的新枚举
|
static MsgGetTypes |
MsgGetTypeFactory.registerType(String name,
Class<? extends MsgGet> listenType)
获取一个MsgGetType的新枚举 - 静态窗口
|
Modifier and Type | Method and Description |
---|---|
MsgGet |
MsgGetContext.getMsgGet() |
Modifier and Type | Method and Description |
---|---|
boolean |
Filterable.filter(Filter filter,
MsgGet msgget,
AtDetection at,
ListenContext context)
根据自定义规则对消息进行过滤
|
void |
MsgGetContext.setMsgGet(MsgGet msgGet) |
Constructor and Description |
---|
MsgGetContext(MsgGet msgGet,
SenderSendList sender,
SenderSetList setter,
SenderGetList getter,
Map<String,Object> globalContextMap) |
Modifier and Type | Method and Description |
---|---|
MsgGet |
ExceptionHandleContext.getMsgGet() |
MsgGet |
ExceptionHandleContextImpl.getMsgGet() |
Modifier and Type | Method and Description |
---|---|
void |
ExceptionHandleContextImpl.setMsgGet(MsgGet msgGet) |
Constructor and Description |
---|
ExceptionHandleContextImpl(String id,
MsgGet msgGet,
MsgSender msgSender,
Exception exception) |
Modifier and Type | Method and Description |
---|---|
static Function<MsgGet,AtDetection> |
ListenerFilter.getAtDetectionFunction()
获取当前的at判断函数
|
Modifier and Type | Method and Description |
---|---|
boolean |
ListenerFilter.blockFilter(ListenerMethod listenerMethod,
MsgGet msgGet,
AtDetection at,
ListenContext context)
根据BlockFilter注解过滤
|
boolean |
ListenerFilter.filter(ListenerMethod listenerMethod,
MsgGet msgGet,
AtDetection at,
ListenContext context)
过滤
|
default ListenResult[] |
MsgReceiver.onMsg(MsgGet msgget,
Function<MsgGet,RootSenderList> senderListFunc)
根据函数构建三大送信器
|
default ListenResult[] |
MsgReceiver.onMsg(MsgGet msgget,
Function<MsgGet,SenderSendList> senderFunc,
Function<MsgGet,SenderSetList> setterFunc,
Function<MsgGet,SenderGetList> getterFunc)
根据函数构建三大送信器
|
default ListenResult[] |
MsgReceiver.onMsg(MsgGet msgget,
MsgSender sender)
接收到一条消息, 获取所有的监听回执
|
default ListenResult[] |
MsgReceiver.onMsg(MsgGet msgget,
RootSenderList sender)
接收到一条消息, 获取所有的监听回执
|
ListenResult[] |
MsgReceiver.onMsg(MsgGet msgGet,
SenderSendList send,
SenderSetList set,
SenderGetList get)
接收到一条消息, 获取所有的监听回执
|
ListenResult[] |
ListenerManager.onMsg(MsgGet msgget,
SenderSendList sender,
SenderSetList setter,
SenderGetList getter)
接收到了消息
|
Modifier and Type | Method and Description |
---|---|
default ListenResult[] |
MsgReceiver.onMsg(MsgGet msgget,
Function<MsgGet,RootSenderList> senderListFunc)
根据函数构建三大送信器
|
default ListenResult[] |
MsgReceiver.onMsg(MsgGet msgget,
Function<MsgGet,SenderSendList> senderFunc,
Function<MsgGet,SenderSetList> setterFunc,
Function<MsgGet,SenderGetList> getterFunc)
根据函数构建三大送信器
|
default ListenResult[] |
MsgReceiver.onMsg(MsgGet msgget,
Function<MsgGet,SenderSendList> senderFunc,
Function<MsgGet,SenderSetList> setterFunc,
Function<MsgGet,SenderGetList> getterFunc)
根据函数构建三大送信器
|
default ListenResult[] |
MsgReceiver.onMsg(MsgGet msgget,
Function<MsgGet,SenderSendList> senderFunc,
Function<MsgGet,SenderSetList> setterFunc,
Function<MsgGet,SenderGetList> getterFunc)
根据函数构建三大送信器
|
static void |
ListenerFilter.registerAtDetectionFunction(Function<MsgGet,AtDetection> atDetectionFunction)
注册一个新的at判断函数,替换当前函数
|
static void |
ListenerFilter.updateAtDetectionFunction(UnaryOperator<Function<MsgGet,AtDetection>> updateFunction)
根据当前的at判断函数来更新一个at判断函数
|
Modifier and Type | Class and Description |
---|---|
class |
TestGroupMsg
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static <T extends MsgGet> |
JSONUtils.toMsgGet(com.alibaba.fastjson.JSONObject jsonObject,
Function<com.alibaba.fastjson.JSONObject,Class<T>> toType)
根据JSONObject对象来将json对象转化为对应的消息获取对象
|
static <T extends MsgGet> |
JSONUtils.toMsgGet(String jsonStr,
Function<com.alibaba.fastjson.JSONObject,Class<T>> toType)
根据json字符串将json对象转化为对应的消息获取对象
|
Modifier and Type | Method and Description |
---|---|
boolean |
CQCodeUtil.isAt(MsgGet msg)
判断是否存在at当前code。
如果其中的thisCode为null,则永远返回false
|
Copyright © 2020. All rights reserved.