Package com.github.twitch4j.pubsub
Class TwitchPubSubBuilder
java.lang.Object
com.github.twitch4j.pubsub.TwitchPubSubBuilder
Deprecated.
Twitch will decommission PubSub on April 14, 2025, with shutdown windows starting in February.
Twitch PubSub Builder
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Deprecated.Twitch will decommission PubSub on April 14, 2025, with shutdown windows starting in February.static TwitchPubSubBuilder
builder()
Deprecated.Twitch will decommission PubSub on April 14, 2025, with shutdown windows starting in February.Deprecated.User IDs of Bot Owners for applyingCommandPermission.OWNER
Deprecated.WebSocket Connection Backoff StrategyClass<? extends com.github.philippheuer.events4j.api.service.IEventHandler>
Deprecated.EventManagercom.github.philippheuer.events4j.core.EventManager
Deprecated.Event ManagerDeprecated.Consumer of PubSub messages for topics that did not match internal handlers.Deprecated.Proxy ConfigurationDeprecated.Scheduler Thread Pool ExecutorDeprecated.WebsocketConnectionint
Deprecated.Websocket Close Delay in ms (0 = minimum)int
Deprecated.WebSocket RFC Ping Period in ms (0 = disabled)setBotOwnerIds
(Collection<String> botOwnerIds) Deprecated.User IDs of Bot Owners for applyingCommandPermission.OWNER
withBotOwnerId
(String userId) Deprecated.With a Bot Owner's User IDwithBotOwnerIds
(Collection<String> botOwnerIds) Deprecated.With multiple Bot Owner User IDswithConnectionBackoffStrategy
(IBackoffStrategy connectionBackoffStrategy) Deprecated.WebSocket Connection Backoff StrategywithDefaultEventHandler
(Class<? extends com.github.philippheuer.events4j.api.service.IEventHandler> defaultEventHandler) Deprecated.EventManagerwithEventManager
(com.github.philippheuer.events4j.core.EventManager eventManager) Deprecated.Event ManagerwithFallbackTopicHandler
(Consumer<PubSubResponsePayload> fallbackTopicHandler) Deprecated.Consumer of PubSub messages for topics that did not match internal handlers.withProxyConfig
(ProxyConfig proxyConfig) Deprecated.Proxy ConfigurationwithScheduledThreadPoolExecutor
(ScheduledThreadPoolExecutor scheduledThreadPoolExecutor) Deprecated.Scheduler Thread Pool Executorprotected TwitchPubSubBuilder
withWebsocketConnection
(WebsocketConnection websocketConnection) Deprecated.WebsocketConnectionwithWsCloseDelay
(int wsCloseDelay) Deprecated.Websocket Close Delay in ms (0 = minimum)withWsPingPeriod
(int wsPingPeriod) Deprecated.WebSocket RFC Ping Period in ms (0 = disabled)
-
Method Details
-
builder
Deprecated.Twitch will decommission PubSub on April 14, 2025, with shutdown windows starting in February.Initialize the builder- Returns:
- Twitch PubSub Builder
- See Also:
-
build
Deprecated.Twitch will decommission PubSub on April 14, 2025, with shutdown windows starting in February.Twitch PubSub Client- Returns:
- TwitchPubSub
- See Also:
-
withBotOwnerId
Deprecated.With a Bot Owner's User ID- Parameters:
userId
- the user id- Returns:
- TwitchPubSubBuilder
-
withBotOwnerIds
Deprecated.With multiple Bot Owner User IDs- Parameters:
botOwnerIds
- the user ids- Returns:
- TwitchPubSubBuilder
-
getWebsocketConnection
Deprecated.WebsocketConnectioncan be used to inject a mocked connection into the TwitchChat instance
-
getEventManager
public com.github.philippheuer.events4j.core.EventManager getEventManager()Deprecated.Event Manager -
getDefaultEventHandler
public Class<? extends com.github.philippheuer.events4j.api.service.IEventHandler> getDefaultEventHandler()Deprecated.EventManager -
getScheduledThreadPoolExecutor
Deprecated.Scheduler Thread Pool Executor -
getProxyConfig
Deprecated.Proxy Configuration -
getBotOwnerIds
Deprecated.User IDs of Bot Owners for applyingCommandPermission.OWNER
-
getWsPingPeriod
public int getWsPingPeriod()Deprecated.WebSocket RFC Ping Period in ms (0 = disabled) -
getWsCloseDelay
public int getWsCloseDelay()Deprecated.Websocket Close Delay in ms (0 = minimum)- See Also:
-
getConnectionBackoffStrategy
Deprecated.WebSocket Connection Backoff Strategy -
getFallbackTopicHandler
Deprecated.Consumer of PubSub messages for topics that did not match internal handlers.By default, Twitch4J simply logs these payloads, but this consumer can be utilized by users to implement new logic, such as support for more undocumented topics.
-
withWebsocketConnection
Deprecated.WebsocketConnectioncan be used to inject a mocked connection into the TwitchChat instance
- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withEventManager
public TwitchPubSubBuilder withEventManager(com.github.philippheuer.events4j.core.EventManager eventManager) Deprecated.Event Manager- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withDefaultEventHandler
public TwitchPubSubBuilder withDefaultEventHandler(Class<? extends com.github.philippheuer.events4j.api.service.IEventHandler> defaultEventHandler) Deprecated.EventManager- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withScheduledThreadPoolExecutor
public TwitchPubSubBuilder withScheduledThreadPoolExecutor(ScheduledThreadPoolExecutor scheduledThreadPoolExecutor) Deprecated.Scheduler Thread Pool Executor- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withProxyConfig
Deprecated.Proxy Configuration- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
setBotOwnerIds
Deprecated.User IDs of Bot Owners for applyingCommandPermission.OWNER
- Returns:
this
.
-
withWsPingPeriod
Deprecated.WebSocket RFC Ping Period in ms (0 = disabled)- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withWsCloseDelay
Deprecated.Websocket Close Delay in ms (0 = minimum)- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed). - See Also:
-
withConnectionBackoffStrategy
public TwitchPubSubBuilder withConnectionBackoffStrategy(IBackoffStrategy connectionBackoffStrategy) Deprecated.WebSocket Connection Backoff Strategy- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withFallbackTopicHandler
public TwitchPubSubBuilder withFallbackTopicHandler(Consumer<PubSubResponsePayload> fallbackTopicHandler) Deprecated.Consumer of PubSub messages for topics that did not match internal handlers.By default, Twitch4J simply logs these payloads, but this consumer can be utilized by users to implement new logic, such as support for more undocumented topics.
- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-