Class TwitchChatConnectionPool

All Implemented Interfaces:
ITwitchChat, TransactionalSubscriber<String,String,Boolean>, AutoCloseable

public class TwitchChatConnectionPool extends TwitchModuleConnectionPool<TwitchChat,String,String,Boolean,TwitchChatBuilder> implements ITwitchChat
A pool for TwitchChat connections.

This pool is easiest to use for:

  • Reading from many channels without an account
  • Reading from many channels with an account
  • Reading from many channels using valid proxies
  • Reading and sending messages/whispers with only one account
Other applications are possible, but harder to configure. See below for a list of warnings.

Warning: If a custom ScheduledThreadPoolExecutor is specified, its corePoolSize must be large enough for the threads required by connections made by this class.

Warning: If a chatAccount is to be shared across multiple connections and used to send messages, one should use advancedConfiguration to ensure the two are using a shared Bucket.

Note: If whispers are to be sent using this pool, one must manually join the channel to send the whisper from first. If chatAccount's are dynamically supplied such that no two connections are using the same account, one can set twitchChatBuilder.withAutoJoinOwnChannel(true) via advancedConfiguration to avoid the manual join.