Class TwitchModuleConnectionPool<C,X,Y,Z,B>

Type Parameters:
B - the builder of the connection
All Implemented Interfaces:
TransactionalSubscriber<X,Y,Z>, AutoCloseable
Direct Known Subclasses:
TwitchChatConnectionPool, TwitchPubSubConnectionPool, TwitchSingleUserEventSocketPool

public abstract class TwitchModuleConnectionPool<C,X,Y,Z,B> extends SubscriptionConnectionPool<C,X,Y,Z>
Adds common configuration options for subscription-based connection pools built around instances of T4J modules.

A pool of connections for making subscriptions (and potentially unsubscribing from later).

  • Field Details

    • executor

      @NonNull protected final @NonNull Supplier<ScheduledThreadPoolExecutor> executor
      The ScheduledThreadPoolExecutor to be used by connections in this pool, if specified.
    • proxyConfig

      @NonNull protected final @NonNull Supplier<ProxyConfig> proxyConfig
      The ProxyConfig to be used by connections in this pool, if specified.
    • advancedConfiguration

      @NonNull protected final @NonNull Function<@NonNull B,@NonNull B> advancedConfiguration
      Further configuration that should be applied to the builder when creating new connections.
  • Constructor Details

  • Method Details

    • getExecutor

      @NonNull protected @NonNull ScheduledThreadPoolExecutor getExecutor(String namePrefix, int poolSize)
    • getConnectionEventManager

      protected com.github.philippheuer.events4j.core.EventManager getConnectionEventManager()
      Returns:
      a EventManager to be used in the construction of a new connection
    • getDefaultConnectionEventManager

      protected com.github.philippheuer.events4j.core.EventManager getDefaultConnectionEventManager()
      Returns:
      the EventManager to use if none was specified by the user for the connection-level
    • getEventManager

      public com.github.philippheuer.events4j.core.EventManager getEventManager()
      The default EventManager for this connection pool, if specified.