public class BotContext
extends java.lang.Object
| Constructor and Description |
|---|
BotContext() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
bindChannel(java.util.UUID uuid,
io.netty.channel.ChannelId id,
ChainHandler chainHandler)
将链接绑定机器人上下文
|
protected void |
configureShard(java.util.UUID uuid,
Shard shard)
配置并检查当前上下文分片
|
static BotContext |
create(java.lang.String appId,
java.lang.String clientSecret,
java.util.concurrent.ExecutorService executor)
创建机器人上下文
|
protected void |
initSession(java.util.UUID uuid,
@Nullable java.util.function.Function<java.util.UUID,Session> sessionFunction)
初始化 Session
|
protected void configureShard(java.util.UUID uuid,
Shard shard)
protected void bindChannel(java.util.UUID uuid,
io.netty.channel.ChannelId id,
ChainHandler chainHandler)
protected void initSession(java.util.UUID uuid,
@Nullable
@Nullable java.util.function.Function<java.util.UUID,Session> sessionFunction)
public static BotContext create(java.lang.String appId, java.lang.String clientSecret, java.util.concurrent.ExecutorService executor)
executor - 托管 wss 连接的线程池 (core >= 2)