Class BilibiliLiveChatClient
java.lang.Object
tech.ordinaryroad.live.chat.client.commons.client.BaseLiveChatClient<Config,MsgListener>
tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient<BilibiliLiveChatClientConfig,BilibiliCmdEnum,IBilibiliMsg,IBilibiliMsgListener,BilibiliConnectionHandler,BilibiliBinaryFrameHandler>
tech.ordinaryroad.live.chat.client.bilibili.client.BilibiliLiveChatClient
- All Implemented Interfaces:
tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener<BilibiliConnectionHandler>,tech.ordinaryroad.live.chat.client.commons.client.IBaseLiveChatClient<IBilibiliMsgListener>
public class BilibiliLiveChatClient
extends tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient<BilibiliLiveChatClientConfig,BilibiliCmdEnum,IBilibiliMsg,IBilibiliMsgListener,BilibiliConnectionHandler,BilibiliBinaryFrameHandler>
B站直播间弹幕客户端
- Author:
- mjz
-
Field Summary
Fields inherited from class tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient
clientConnectionListenerFields inherited from class tech.ordinaryroad.live.chat.client.commons.client.BaseLiveChatClient
cancelReconnect, statusChangeSupport -
Constructor Summary
ConstructorsConstructorDescriptionBilibiliLiveChatClient(BilibiliLiveChatClientConfig config, List<IBilibiliMsgListener> msgListeners, IBilibiliConnectionListener connectionListener, io.netty.channel.EventLoopGroup workerGroup) BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, IBilibiliMsgListener msgListener) BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, IBilibiliMsgListener msgListener, IBilibiliConnectionListener connectionListener) BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, IBilibiliMsgListener msgListener, IBilibiliConnectionListener connectionListener, io.netty.channel.EventLoopGroup workerGroup) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidconnect()protected Stringvoidinit()protected voidinitChannel(io.netty.channel.socket.SocketChannel channel) initConnectionHandler(tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener<BilibiliConnectionHandler> clientConnectionListener) voidMethods inherited from class tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient
checkCanSendDanmu, checkCanSendDanmu, connect, destroy, disconnect, finishSendDanmu, getBootstrap, getWebsocketUri, getWorkerGroup, onConnected, onConnectFailed, onDisconnected, send, setStatus, tryReconnectMethods inherited from class tech.ordinaryroad.live.chat.client.commons.client.BaseLiveChatClient
addMsgListener, addMsgListeners, addStatusChangeListener, checkStatus, clickLike, clickLike, clickLike, connect, disconnect, getConfig, getMsgListeners, getStatus, iteratorMsgListeners, removeAllMsgListeners, removeMsgListener, removeMsgListeners, removeStatusChangeListener, send, send, send, sendDanmu, sendDanmu, sendDanmu
-
Constructor Details
-
BilibiliLiveChatClient
public BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, List<IBilibiliMsgListener> msgListeners, IBilibiliConnectionListener connectionListener, io.netty.channel.EventLoopGroup workerGroup) -
BilibiliLiveChatClient
public BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, IBilibiliMsgListener msgListener, IBilibiliConnectionListener connectionListener, io.netty.channel.EventLoopGroup workerGroup) -
BilibiliLiveChatClient
public BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, IBilibiliMsgListener msgListener, IBilibiliConnectionListener connectionListener) -
BilibiliLiveChatClient
public BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, IBilibiliMsgListener msgListener) -
BilibiliLiveChatClient
-
-
Method Details
-
init
public void init()- Specified by:
initin interfacetech.ordinaryroad.live.chat.client.commons.client.IBaseLiveChatClient<IBilibiliMsgListener>- Overrides:
initin classtech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient<BilibiliLiveChatClientConfig,BilibiliCmdEnum, IBilibiliMsg, IBilibiliMsgListener, BilibiliConnectionHandler, BilibiliBinaryFrameHandler>
-
initChannel
protected void initChannel(io.netty.channel.socket.SocketChannel channel) - Overrides:
initChannelin classtech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient<BilibiliLiveChatClientConfig,BilibiliCmdEnum, IBilibiliMsg, IBilibiliMsgListener, BilibiliConnectionHandler, BilibiliBinaryFrameHandler>
-
connect
public void connect()- Specified by:
connectin interfacetech.ordinaryroad.live.chat.client.commons.client.IBaseLiveChatClient<IBilibiliMsgListener>- Overrides:
connectin classtech.ordinaryroad.live.chat.client.commons.client.BaseLiveChatClient<BilibiliLiveChatClientConfig,IBilibiliMsgListener>
-
initConnectionHandler
public BilibiliConnectionHandler initConnectionHandler(tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener<BilibiliConnectionHandler> clientConnectionListener) - Specified by:
initConnectionHandlerin classtech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient<BilibiliLiveChatClientConfig,BilibiliCmdEnum, IBilibiliMsg, IBilibiliMsgListener, BilibiliConnectionHandler, BilibiliBinaryFrameHandler>
-
getWebSocketUriString
- Overrides:
getWebSocketUriStringin classtech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient<BilibiliLiveChatClientConfig,BilibiliCmdEnum, IBilibiliMsg, IBilibiliMsgListener, BilibiliConnectionHandler, BilibiliBinaryFrameHandler>
-
sendDanmu
- Specified by:
sendDanmuin interfacetech.ordinaryroad.live.chat.client.commons.client.IBaseLiveChatClient<IBilibiliMsgListener>- Overrides:
sendDanmuin classtech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient<BilibiliLiveChatClientConfig,BilibiliCmdEnum, IBilibiliMsg, IBilibiliMsgListener, BilibiliConnectionHandler, BilibiliBinaryFrameHandler>
-
clickLike
- Specified by:
clickLikein interfacetech.ordinaryroad.live.chat.client.commons.client.IBaseLiveChatClient<IBilibiliMsgListener>- Overrides:
clickLikein classtech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient<BilibiliLiveChatClientConfig,BilibiliCmdEnum, IBilibiliMsg, IBilibiliMsgListener, BilibiliConnectionHandler, BilibiliBinaryFrameHandler>
-