public interface BotManager
Modifier and Type | Method and Description |
---|---|
BotInfo[] |
bots()
获取全部的bot信息
|
BotInfo |
defaultBot()
大多数情况下,可能不一定必须指定一个bot,则此方法规定获取一个默认的bot
|
BotInfo |
getBot(String botCode)
通过bot的code获取一个Bot的信息
参数有可能为null
|
PathAssembler |
getPathAssembler()
获取路径拼接函数
|
VerifyFunction |
getVerifyFunction()
获取注册用的验证函数
|
BotInfo |
logOutBot(String code)
注销掉一个bot,将其从bot列表中移除。
注意现成安全问题。
|
default void |
refreshBot()
TODO 刷新所有bot的信息
|
void |
refreshBot(String code)
TODO 刷新一个Bot的账号信息
|
BotInfo |
registerBot(BotInfo info)
注册一个botInfo。在实现的时候需要注意线程安全问题,概率较小,但是不是没有可能
|
default BotInfo |
registerBot(String fullPath)
注册一个bot。code为null
|
default BotInfo |
registerBot(String ip,
int port,
String path)
注册一个bot。code为null
|
default BotInfo |
registerBot(String code,
String fullPath)
注册一个bot。
|
default BotInfo |
registerBot(String code,
String ip,
int port,
String path)
注册一个bot。
|
void |
setDefaultBot(String botCode)
设置默认bot的账号信息
|
BotInfo defaultBot()
void setDefaultBot(String botCode)
botCode
- 默认bot的账号信息BotInfo getBot(String botCode)
botCode
- 账号BotInfo[] bots()
BotInfo registerBot(BotInfo info)
info
- bot信息,作为key的code信息将会从其中获取。info中的各项参数不可为nulldefault BotInfo registerBot(String code, String ip, int port, String path)
code
- 账号, 可以为nullip
- ip地址port
- 端口号path
- 请求路径default BotInfo registerBot(String code, String fullPath)
code
- 账号, 可以为nullfullPath
- 完整路径default BotInfo registerBot(String ip, int port, String path)
ip
- ip地址port
- 端口号path
- 请求路径default BotInfo registerBot(String fullPath)
fullPath
- 完整路径BotInfo logOutBot(String code)
code
- 要注销掉的bot账号void refreshBot(String code)
code
- 要刷新的bot账号的信息default void refreshBot()
VerifyFunction getVerifyFunction()
PathAssembler getPathAssembler()
Copyright © 2020. All rights reserved.