public class Tio extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Tio.IpBlacklist |
Modifier and Type | Method and Description |
---|---|
static void |
bindBsId(ChannelContext channelContext,
String bsId)
绑定业务id
|
static void |
bindGroup(ChannelContext channelContext,
String group)
绑定群组
|
static void |
bindGroup(TioConfig tioConfig,
String userid,
String group)
将用户绑定到群组
|
static void |
bindToken(ChannelContext channelContext,
String token)
绑定token
|
static void |
bindUser(ChannelContext channelContext,
String userid)
绑定用户
|
static Boolean |
bSend(ChannelContext channelContext,
Packet packet)
阻塞发送消息到指定ChannelContext
|
static Boolean |
bSend(TioConfig tioConfig,
String ip,
int port,
Packet packet)
发送到指定的ip和port
|
static Boolean |
bSendToAll(TioConfig tioConfig,
Packet packet,
ChannelContextFilter channelContextFilter)
发消息到所有连接
|
static Boolean |
bSendToBsId(TioConfig tioConfig,
String bsId,
Packet packet)
阻塞发消息给指定业务ID
|
static Boolean |
bSendToGroup(TioConfig tioConfig,
String group,
Packet packet)
发消息到组
|
static Boolean |
bSendToGroup(TioConfig tioConfig,
String group,
Packet packet,
ChannelContextFilter channelContextFilter)
发消息到组
|
static Boolean |
bSendToId(TioConfig tioConfig,
String channelContextId,
Packet packet)
发消息给指定ChannelContext id
|
static Boolean |
bSendToIp(TioConfig tioConfig,
String ip,
Packet packet)
阻塞发送到指定ip对应的集合
|
static Boolean |
bSendToIp(TioConfig tioConfig,
String ip,
Packet packet,
ChannelContextFilter channelContextFilter)
阻塞发送到指定ip对应的集合
|
static Boolean |
bSendToSet(TioConfig tioConfig,
SetWithLock<ChannelContext> setWithLock,
Packet packet,
ChannelContextFilter channelContextFilter)
发消息到指定集合
|
static Boolean |
bSendToToken(TioConfig tioConfig,
String token,
Packet packet)
阻塞发消息到指定token
|
static Boolean |
bSendToUser(TioConfig tioConfig,
String userid,
Packet packet)
阻塞发消息给指定用户
|
static void |
close(ChannelContext channelContext,
String remark)
关闭连接
|
static void |
close(ChannelContext channelContext,
String remark,
ChannelContext.CloseCode closeCode) |
static void |
close(ChannelContext channelContext,
Throwable throwable,
String remark)
关闭连接
|
static void |
close(ChannelContext channelContext,
Throwable throwable,
String remark,
boolean isNeedRemove) |
static void |
close(ChannelContext channelContext,
Throwable throwable,
String remark,
boolean isNeedRemove,
boolean needCloseLock) |
static void |
close(ChannelContext channelContext,
Throwable throwable,
String remark,
boolean isNeedRemove,
boolean needCloseLock,
ChannelContext.CloseCode closeCode) |
static void |
close(ChannelContext channelContext,
Throwable throwable,
String remark,
boolean isNeedRemove,
ChannelContext.CloseCode closeCode) |
static void |
close(ChannelContext channelContext,
Throwable throwable,
String remark,
ChannelContext.CloseCode closeCode) |
static void |
close(TioConfig tioConfig,
String clientIp,
Integer clientPort,
Throwable throwable,
String remark)
关闭连接
|
static void |
closeGroup(TioConfig tioConfig,
String group,
String remark)
关闭某群所有连接
|
static void |
closeGroup(TioConfig tioConfig,
String group,
String remark,
ChannelContext.CloseCode closeCode)
关闭某群所有连接
|
static void |
closeIp(TioConfig tioConfig,
String ip,
String remark)
关闭某群所有连接
|
static void |
closeIp(TioConfig tioConfig,
String ip,
String remark,
ChannelContext.CloseCode closeCode)
关闭某群所有连接
|
static void |
closeSet(TioConfig tioConfig,
SetWithLock<ChannelContext> setWithLock,
String remark,
ChannelContext.CloseCode closeCode)
关闭集合
|
static void |
closeToken(TioConfig tioConfig,
String token,
String remark)
关闭token的所有连接
|
static void |
closeToken(TioConfig tioConfig,
String token,
String remark,
ChannelContext.CloseCode closeCode)
关闭某token的所有连接
|
static void |
closeUser(TioConfig tioConfig,
String userid,
String remark)
关闭用户的所有连接
|
static void |
closeUser(TioConfig tioConfig,
String userid,
String remark,
ChannelContext.CloseCode closeCode)
关闭某用户的所有连接
|
static SetWithLock<ChannelContext> |
getAll(TioConfig tioConfig)
获取所有连接,包括当前处于断开状态的
|
static SetWithLock<ChannelContext> |
getAllChannelContexts(TioConfig tioConfig)
Deprecated.
用getAll(TioConfig tioConfig)
|
static SetWithLock<ChannelContext> |
getAllConnectedsChannelContexts(ClientTioConfig clientTioConfig)
Deprecated.
用getAllConnecteds(ClientTioConfig clientTioConfig)
|
static ChannelContext |
getByBsId(TioConfig tioConfig,
String bsId)
根据业务id找ChannelContext
|
static ChannelContext |
getByChannelContextId(TioConfig tioConfig,
String channelContextId)
根据ChannelContext.id获取ChannelContext
|
static ChannelContext |
getByClientNode(TioConfig tioConfig,
String clientIp,
Integer clientPort)
根据clientip和clientport获取ChannelContext
|
static SetWithLock<ChannelContext> |
getByGroup(TioConfig tioConfig,
String group)
获取一个组的所有客户端
|
static SetWithLock<ChannelContext> |
getByIp(TioConfig tioConfig,
String ip)
根据客户端ip获取SetWithLock
|
static SetWithLock<ChannelContext> |
getByToken(TioConfig tioConfig,
String token)
根据token获取SetWithLock
|
static SetWithLock<ChannelContext> |
getByUserid(TioConfig tioConfig,
String userid)
根据userid获取SetWithLock
|
static ChannelContext |
getChannelContextByBsId(TioConfig tioConfig,
String bsId)
Deprecated.
用getByBsId(TioConfig tioConfig, String bsId)
|
static ChannelContext |
getChannelContextByClientNode(TioConfig tioConfig,
String clientIp,
Integer clientPort)
Deprecated.
getByClientNode(tioConfig, clientIp, clientPort)
|
static ChannelContext |
getChannelContextById(TioConfig tioConfig,
String channelContextId)
Deprecated.
用getByChannelContextId(tioConfig, channelContextId)
|
static SetWithLock<ChannelContext> |
getChannelContextsByGroup(TioConfig tioConfig,
String group)
Deprecated.
用getByGroup(tioConfig, group)
|
static SetWithLock<ChannelContext> |
getChannelContextsByToken(TioConfig tioConfig,
String token)
Deprecated.
用getByToken(tioConfig, token)
|
static SetWithLock<ChannelContext> |
getChannelContextsByUserid(TioConfig tioConfig,
String userid)
Deprecated.
用getByUserid(tioConfig, userid)
|
static SetWithLock<ChannelContext> |
getConnecteds(ClientTioConfig clientTioConfig)
此API仅供 tio client使用
获取所有处于正常连接状态的连接
|
static Page<ChannelContext> |
getPageOfAll(TioConfig tioConfig,
Integer pageIndex,
Integer pageSize) |
static <T> Page<T> |
getPageOfAll(TioConfig tioConfig,
Integer pageIndex,
Integer pageSize,
Converter<T> converter) |
static Page<ChannelContext> |
getPageOfConnecteds(ClientTioConfig clientTioConfig,
Integer pageIndex,
Integer pageSize)
这个方法是给客户器端用的
|
static <T> Page<T> |
getPageOfConnecteds(ClientTioConfig clientTioConfig,
Integer pageIndex,
Integer pageSize,
Converter<T> converter)
这个方法是给客户器端用的
|
static Page<ChannelContext> |
getPageOfGroup(TioConfig tioConfig,
String group,
Integer pageIndex,
Integer pageSize) |
static <T> Page<T> |
getPageOfGroup(TioConfig tioConfig,
String group,
Integer pageIndex,
Integer pageSize,
Converter<T> converter) |
static int |
groupCount(TioConfig tioConfig,
String group)
群组有多少个连接
|
static boolean |
isInGroup(String group,
ChannelContext channelContext)
某通道是否在某群组中
|
static void |
remove(ChannelContext channelContext,
String remark) |
static void |
remove(ChannelContext channelContext,
String remark,
ChannelContext.CloseCode closeCode)
和close方法对应,只不过不再进行重连等维护性的操作
|
static void |
remove(ChannelContext channelContext,
Throwable throwable,
String remark)
和close方法对应,只不过不再进行重连等维护性的操作
|
static void |
remove(ChannelContext channelContext,
Throwable throwable,
String remark,
ChannelContext.CloseCode closeCode)
和close方法对应,只不过不再进行重连等维护性的操作
|
static void |
remove(ServerTioConfig serverTioConfig,
String ip,
String remark)
删除clientip为指定值的所有连接
|
static void |
remove(ServerTioConfig serverTioConfig,
String ip,
String remark,
ChannelContext.CloseCode closeCode)
删除clientip为指定值的所有连接
|
static void |
remove(TioConfig tioConfig,
String clientIp,
Integer clientPort,
Throwable throwable,
String remark)
和close方法对应,只不过不再进行重连等维护性的操作
|
static void |
remove(TioConfig tioConfig,
String clientIp,
Integer clientPort,
Throwable throwable,
String remark,
ChannelContext.CloseCode closeCode)
删除clientip和clientPort为指定值的连接
|
static void |
removeGroup(TioConfig tioConfig,
String group,
String remark)
关闭某群所有连接
|
static void |
removeGroup(TioConfig tioConfig,
String group,
String remark,
ChannelContext.CloseCode removeCode)
关闭某群所有连接
|
static void |
removeIp(TioConfig tioConfig,
String ip,
String remark)
关闭某群所有连接
|
static void |
removeIp(TioConfig tioConfig,
String ip,
String remark,
ChannelContext.CloseCode removeCode)
关闭某群所有连接
|
static void |
removeSet(TioConfig tioConfig,
SetWithLock<ChannelContext> setWithLock,
String remark,
ChannelContext.CloseCode closeCode)
移除集合
|
static void |
removeToken(TioConfig tioConfig,
String token,
String remark)
关闭token的所有连接
|
static void |
removeToken(TioConfig tioConfig,
String token,
String remark,
ChannelContext.CloseCode removeCode)
关闭某token的所有连接
|
static void |
removeUser(TioConfig tioConfig,
String userid,
String remark)
关闭用户的所有连接
|
static void |
removeUser(TioConfig tioConfig,
String userid,
String remark,
ChannelContext.CloseCode removeCode)
关闭某用户的所有连接
|
static Boolean |
send(ChannelContext channelContext,
Packet packet)
发送消息到指定ChannelContext
|
static Boolean |
send(TioConfig tioConfig,
String ip,
int port,
Packet packet)
发送到指定的ip和port
|
static void |
sendToAll(TioConfig tioConfig,
Packet packet) |
static void |
sendToAll(TioConfig tioConfig,
Packet packet,
ChannelContextFilter channelContextFilter)
发消息到所有连接
|
static Boolean |
sendToBsId(TioConfig tioConfig,
String bsId,
Packet packet)
发消息给指定业务ID
|
static void |
sendToGroup(TioConfig tioConfig,
String group,
Packet packet)
发消息到组
|
static void |
sendToGroup(TioConfig tioConfig,
String group,
Packet packet,
ChannelContextFilter channelContextFilter)
发消息到组
|
static Boolean |
sendToId(TioConfig tioConfig,
String channelContextId,
Packet packet)
发消息给指定ChannelContext id
|
static void |
sendToIp(TioConfig tioConfig,
String ip,
Packet packet)
发送到指定ip对应的集合
|
static void |
sendToIp(TioConfig tioConfig,
String ip,
Packet packet,
ChannelContextFilter channelContextFilter)
发送到指定ip对应的集合
|
static void |
sendToSet(TioConfig tioConfig,
SetWithLock<ChannelContext> setWithLock,
Packet packet,
ChannelContextFilter channelContextFilter)
发消息到指定集合
|
static Boolean |
sendToToken(TioConfig tioConfig,
String token,
Packet packet)
发消息到指定token
|
static Boolean |
sendToUser(TioConfig tioConfig,
String userid,
Packet packet)
发消息给指定用户
|
static void |
unbindBsId(ChannelContext channelContext)
解绑业务id
|
static void |
unbindGroup(ChannelContext channelContext)
与所有组解除解绑关系
|
static void |
unbindGroup(String group,
ChannelContext channelContext)
与指定组解除绑定关系
|
static void |
unbindGroup(TioConfig tioConfig,
String userid,
String group)
将某用户从组中解除绑定
|
static void |
unbindToken(ChannelContext channelContext)
解除channelContext绑定的token
|
static void |
unbindToken(TioConfig tioConfig,
String token)
解除token
|
static void |
unbindUser(ChannelContext channelContext)
解除channelContext绑定的userid
|
static void |
unbindUser(TioConfig tioConfig,
String userid)
解除userid的绑定。一般用于多地登录,踢掉前面登录的场景
|
public static void bindBsId(ChannelContext channelContext, String bsId)
channelContext
- bsId
- public static void bindGroup(ChannelContext channelContext, String group)
channelContext
- group
- public static void bindGroup(TioConfig tioConfig, String userid, String group)
tioConfig
- userid
- group
- public static void bindToken(ChannelContext channelContext, String token)
channelContext
- token
- public static void bindUser(ChannelContext channelContext, String userid)
channelContext
- userid
- public static Boolean bSend(ChannelContext channelContext, Packet packet)
channelContext
- packet
- public static Boolean bSend(TioConfig tioConfig, String ip, int port, Packet packet)
tioConfig
- ip
- port
- packet
- public static Boolean bSendToAll(TioConfig tioConfig, Packet packet, ChannelContextFilter channelContextFilter)
tioConfig
- packet
- channelContextFilter
- public static Boolean bSendToBsId(TioConfig tioConfig, String bsId, Packet packet)
tioConfig
- bsId
- packet
- public static Boolean bSendToGroup(TioConfig tioConfig, String group, Packet packet)
tioConfig
- group
- packet
- public static Boolean bSendToGroup(TioConfig tioConfig, String group, Packet packet, ChannelContextFilter channelContextFilter)
tioConfig
- group
- packet
- channelContextFilter
- public static Boolean bSendToId(TioConfig tioConfig, String channelContextId, Packet packet)
channelContextId
- packet
- public static Boolean bSendToIp(TioConfig tioConfig, String ip, Packet packet)
tioConfig
- ip
- packet
- public static Boolean bSendToIp(TioConfig tioConfig, String ip, Packet packet, ChannelContextFilter channelContextFilter)
tioConfig
- ip
- packet
- channelContextFilter
- public static Boolean bSendToSet(TioConfig tioConfig, SetWithLock<ChannelContext> setWithLock, Packet packet, ChannelContextFilter channelContextFilter)
tioConfig
- setWithLock
- packet
- channelContextFilter
- public static Boolean bSendToToken(TioConfig tioConfig, String token, Packet packet)
tioConfig
- token
- packet
- public static Boolean bSendToUser(TioConfig tioConfig, String userid, Packet packet)
tioConfig
- userid
- packet
- public static void close(ChannelContext channelContext, String remark)
channelContext
- remark
- public static void close(ChannelContext channelContext, String remark, ChannelContext.CloseCode closeCode)
channelContext
- remark
- closeCode
- public static void close(ChannelContext channelContext, Throwable throwable, String remark)
channelContext
- throwable
- remark
- public static void close(ChannelContext channelContext, Throwable throwable, String remark, ChannelContext.CloseCode closeCode)
public static void close(ChannelContext channelContext, Throwable throwable, String remark, boolean isNeedRemove)
public static void close(ChannelContext channelContext, Throwable throwable, String remark, boolean isNeedRemove, ChannelContext.CloseCode closeCode)
public static void close(ChannelContext channelContext, Throwable throwable, String remark, boolean isNeedRemove, boolean needCloseLock)
public static void close(ChannelContext channelContext, Throwable throwable, String remark, boolean isNeedRemove, boolean needCloseLock, ChannelContext.CloseCode closeCode)
channelContext
- throwable
- remark
- isNeedRemove
- needCloseLock
- public static void close(TioConfig tioConfig, String clientIp, Integer clientPort, Throwable throwable, String remark)
tioConfig
- clientIp
- clientPort
- throwable
- remark
- public static void closeIp(TioConfig tioConfig, String ip, String remark)
tioConfig
- ip
- remark
- public static void closeIp(TioConfig tioConfig, String ip, String remark, ChannelContext.CloseCode closeCode)
tioConfig
- ip
- remark
- closeCode
- public static void closeGroup(TioConfig tioConfig, String group, String remark)
tioConfig
- group
- remark
- public static void closeGroup(TioConfig tioConfig, String group, String remark, ChannelContext.CloseCode closeCode)
tioConfig
- group
- remark
- closeCode
- public static void closeUser(TioConfig tioConfig, String userid, String remark)
tioConfig
- userid
- remark
- public static void closeUser(TioConfig tioConfig, String userid, String remark, ChannelContext.CloseCode closeCode)
tioConfig
- userid
- remark
- closeCode
- public static void closeToken(TioConfig tioConfig, String token, String remark)
tioConfig
- token
- remark
- public static void closeToken(TioConfig tioConfig, String token, String remark, ChannelContext.CloseCode closeCode)
tioConfig
- token
- remark
- closeCode
- public static void removeIp(TioConfig tioConfig, String ip, String remark)
tioConfig
- ip
- remark
- public static void removeIp(TioConfig tioConfig, String ip, String remark, ChannelContext.CloseCode removeCode)
tioConfig
- ip
- remark
- removeCode
- public static void removeGroup(TioConfig tioConfig, String group, String remark)
tioConfig
- group
- remark
- public static void removeGroup(TioConfig tioConfig, String group, String remark, ChannelContext.CloseCode removeCode)
tioConfig
- group
- remark
- removeCode
- public static void removeUser(TioConfig tioConfig, String userid, String remark)
tioConfig
- userid
- remark
- public static void removeUser(TioConfig tioConfig, String userid, String remark, ChannelContext.CloseCode removeCode)
tioConfig
- userid
- remark
- removeCode
- public static void removeToken(TioConfig tioConfig, String token, String remark)
tioConfig
- token
- remark
- public static void removeToken(TioConfig tioConfig, String token, String remark, ChannelContext.CloseCode removeCode)
tioConfig
- token
- remark
- removeCode
- public static void closeSet(TioConfig tioConfig, SetWithLock<ChannelContext> setWithLock, String remark, ChannelContext.CloseCode closeCode)
tioConfig
- setWithLock
- remark
- closeCode
- public static void removeSet(TioConfig tioConfig, SetWithLock<ChannelContext> setWithLock, String remark, ChannelContext.CloseCode closeCode)
tioConfig
- setWithLock
- remark
- closeCode
- public static SetWithLock<ChannelContext> getAll(TioConfig tioConfig)
tioConfig
- public static SetWithLock<ChannelContext> getAllChannelContexts(TioConfig tioConfig)
tioConfig
- public static SetWithLock<ChannelContext> getConnecteds(ClientTioConfig clientTioConfig)
clientTioConfig
- public static SetWithLock<ChannelContext> getAllConnectedsChannelContexts(ClientTioConfig clientTioConfig)
clientTioConfig
- public static ChannelContext getByBsId(TioConfig tioConfig, String bsId)
tioConfig
- bsId
- public static ChannelContext getChannelContextByBsId(TioConfig tioConfig, String bsId)
tioConfig
- bsId
- public static ChannelContext getByClientNode(TioConfig tioConfig, String clientIp, Integer clientPort)
tioConfig
- clientIp
- clientPort
- public static ChannelContext getChannelContextByClientNode(TioConfig tioConfig, String clientIp, Integer clientPort)
tioConfig
- clientIp
- clientPort
- public static ChannelContext getByChannelContextId(TioConfig tioConfig, String channelContextId)
channelContextId
- public static ChannelContext getChannelContextById(TioConfig tioConfig, String channelContextId)
channelContextId
- public static SetWithLock<ChannelContext> getByGroup(TioConfig tioConfig, String group)
tioConfig
- group
- public static SetWithLock<ChannelContext> getChannelContextsByGroup(TioConfig tioConfig, String group)
tioConfig
- group
- public static SetWithLock<ChannelContext> getByToken(TioConfig tioConfig, String token)
tioConfig
- token
- public static SetWithLock<ChannelContext> getByIp(TioConfig tioConfig, String ip)
tioConfig
- ip
- public static SetWithLock<ChannelContext> getChannelContextsByToken(TioConfig tioConfig, String token)
tioConfig
- token
- public static SetWithLock<ChannelContext> getByUserid(TioConfig tioConfig, String userid)
tioConfig
- userid
- public static SetWithLock<ChannelContext> getChannelContextsByUserid(TioConfig tioConfig, String userid)
tioConfig
- userid
- public static Page<ChannelContext> getPageOfAll(TioConfig tioConfig, Integer pageIndex, Integer pageSize)
tioConfig
- pageIndex
- pageSize
- public static <T> Page<T> getPageOfAll(TioConfig tioConfig, Integer pageIndex, Integer pageSize, Converter<T> converter)
tioConfig
- pageIndex
- pageSize
- converter
- public static Page<ChannelContext> getPageOfConnecteds(ClientTioConfig clientTioConfig, Integer pageIndex, Integer pageSize)
clientTioConfig
- pageIndex
- pageSize
- public static <T> Page<T> getPageOfConnecteds(ClientTioConfig clientTioConfig, Integer pageIndex, Integer pageSize, Converter<T> converter)
clientTioConfig
- pageIndex
- pageSize
- converter
- public static Page<ChannelContext> getPageOfGroup(TioConfig tioConfig, String group, Integer pageIndex, Integer pageSize)
tioConfig
- group
- pageIndex
- pageSize
- public static <T> Page<T> getPageOfGroup(TioConfig tioConfig, String group, Integer pageIndex, Integer pageSize, Converter<T> converter)
tioConfig
- group
- pageIndex
- pageSize
- converter
- public static int groupCount(TioConfig tioConfig, String group)
tioConfig
- group
- public static boolean isInGroup(String group, ChannelContext channelContext)
group
- channelContext
- public static void remove(ChannelContext channelContext, String remark)
channelContext
- remark
- public static void remove(ChannelContext channelContext, String remark, ChannelContext.CloseCode closeCode)
channelContext
- remark
- closeCode
- public static void remove(ChannelContext channelContext, Throwable throwable, String remark)
channelContext
- throwable
- remark
- public static void remove(ChannelContext channelContext, Throwable throwable, String remark, ChannelContext.CloseCode closeCode)
channelContext
- throwable
- remark
- closeCode
- public static void remove(TioConfig tioConfig, String clientIp, Integer clientPort, Throwable throwable, String remark)
tioConfig
- clientIp
- clientPort
- throwable
- remark
- public static void remove(TioConfig tioConfig, String clientIp, Integer clientPort, Throwable throwable, String remark, ChannelContext.CloseCode closeCode)
tioConfig
- clientIp
- clientPort
- throwable
- remark
- closeCode
- public static void remove(ServerTioConfig serverTioConfig, String ip, String remark)
serverTioConfig
- ip
- remark
- public static void remove(ServerTioConfig serverTioConfig, String ip, String remark, ChannelContext.CloseCode closeCode)
serverTioConfig
- ip
- remark
- closeCode
- public static Boolean send(ChannelContext channelContext, Packet packet)
channelContext
- packet
- public static Boolean send(TioConfig tioConfig, String ip, int port, Packet packet)
tioConfig
- ip
- port
- packet
- public static void sendToAll(TioConfig tioConfig, Packet packet, ChannelContextFilter channelContextFilter)
tioConfig
- packet
- channelContextFilter
- public static Boolean sendToBsId(TioConfig tioConfig, String bsId, Packet packet)
tioConfig
- bsId
- packet
- public static void sendToGroup(TioConfig tioConfig, String group, Packet packet)
tioConfig
- group
- packet
- public static void sendToGroup(TioConfig tioConfig, String group, Packet packet, ChannelContextFilter channelContextFilter)
tioConfig
- group
- packet
- channelContextFilter
- public static Boolean sendToId(TioConfig tioConfig, String channelContextId, Packet packet)
channelContextId
- packet
- public static void sendToIp(TioConfig tioConfig, String ip, Packet packet)
tioConfig
- ip
- packet
- public static void sendToIp(TioConfig tioConfig, String ip, Packet packet, ChannelContextFilter channelContextFilter)
tioConfig
- ip
- packet
- channelContextFilter
- public static void sendToSet(TioConfig tioConfig, SetWithLock<ChannelContext> setWithLock, Packet packet, ChannelContextFilter channelContextFilter)
tioConfig
- setWithLock
- packet
- channelContextFilter
- public static Boolean sendToToken(TioConfig tioConfig, String token, Packet packet)
tioConfig
- token
- packet
- public static Boolean sendToUser(TioConfig tioConfig, String userid, Packet packet)
tioConfig
- userid
- packet
- public static void unbindBsId(ChannelContext channelContext)
channelContext
- public static void unbindGroup(ChannelContext channelContext)
channelContext
- public static void unbindGroup(String group, ChannelContext channelContext)
group
- channelContext
- public static void unbindGroup(TioConfig tioConfig, String userid, String group)
tioConfig
- userid
- group
- public static void unbindToken(ChannelContext channelContext)
channelContext
- public static void unbindToken(TioConfig tioConfig, String token)
tioConfig
- token
- public static void unbindUser(ChannelContext channelContext)
channelContext
- Copyright © 2021. All rights reserved.