Package com.github.twitch4j.common.pool
Class TwitchModuleConnectionPool.TwitchModuleConnectionPoolBuilder<C,X,Y,Z,B,C2 extends TwitchModuleConnectionPool<C,X,Y,Z,B>,B2 extends TwitchModuleConnectionPool.TwitchModuleConnectionPoolBuilder<C,X,Y,Z,B,C2,B2>>
java.lang.Object
com.github.twitch4j.common.pool.AbstractConnectionPool.AbstractConnectionPoolBuilder<C,C2,B>
com.github.twitch4j.common.pool.SubscriptionConnectionPool.SubscriptionConnectionPoolBuilder<C,X,Y,Z,C2,B2>
com.github.twitch4j.common.pool.TwitchModuleConnectionPool.TwitchModuleConnectionPoolBuilder<C,X,Y,Z,B,C2,B2>
- Direct Known Subclasses:
TwitchChatConnectionPool.TwitchChatConnectionPoolBuilder,TwitchPubSubConnectionPool.TwitchPubSubConnectionPoolBuilder,TwitchSingleUserEventSocketPool.TwitchSingleUserEventSocketPoolBuilder
public abstract static class TwitchModuleConnectionPool.TwitchModuleConnectionPoolBuilder<C,X,Y,Z,B,C2 extends TwitchModuleConnectionPool<C,X,Y,Z,B>,B2 extends TwitchModuleConnectionPool.TwitchModuleConnectionPoolBuilder<C,X,Y,Z,B,C2,B2>>
extends SubscriptionConnectionPool.SubscriptionConnectionPoolBuilder<C,X,Y,Z,C2,B2>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadvancedConfiguration(@NonNull Function<@NonNull B, @NonNull B> advancedConfiguration) Further configuration that should be applied to the builder when creating new connections.abstract C2build()connectionEventManager(Supplier<com.github.philippheuer.events4j.core.EventManager> connectionEventManager) TheEventManagerto be used by connections in this pool.eventManager(com.github.philippheuer.events4j.core.EventManager eventManager) The defaultEventManagerfor this connection pool, if specified.executor(@NonNull Supplier<ScheduledThreadPoolExecutor> executor) TheScheduledThreadPoolExecutorto be used by connections in this pool, if specified.proxyConfig(@NonNull Supplier<ProxyConfig> proxyConfig) TheProxyConfigto be used by connections in this pool, if specified.protected abstract B2self()toString()Methods inherited from class com.github.twitch4j.common.pool.SubscriptionConnectionPool.SubscriptionConnectionPoolBuilder
disposeUnusedConnections, maxSubscriptionsPerConnection
-
Constructor Details
-
TwitchModuleConnectionPoolBuilder
public TwitchModuleConnectionPoolBuilder()
-
-
Method Details
-
eventManager
The defaultEventManagerfor this connection pool, if specified.- Returns:
this.
-
connectionEventManager
public B2 connectionEventManager(Supplier<com.github.philippheuer.events4j.core.EventManager> connectionEventManager) TheEventManagerto be used by connections in this pool.If the supplier itself is null, the connection will use the pool's aggregate
EventManager. If the supplier yields null, the connection will use its ownEventManager.- Returns:
this.
-
executor
TheScheduledThreadPoolExecutorto be used by connections in this pool, if specified.- Returns:
this.
-
proxyConfig
TheProxyConfigto be used by connections in this pool, if specified.- Returns:
this.
-
advancedConfiguration
public B2 advancedConfiguration(@NonNull @NonNull Function<@NonNull B, @NonNull B> advancedConfiguration) Further configuration that should be applied to the builder when creating new connections.- Returns:
this.
-
self
-
build
-
toString
-