Class ConduitSpec
-
Method Summary
Modifier and TypeMethodDescriptionThe app access token for helix requests.appAccessToken(@Nullable OAuth2Credential appAccessToken) The app access token for helix requests.clientId()Your application's client ID.Your application's client ID.Your application's client secret.clientSecret(@Nullable String clientSecret) Your application's client secret.The ID of an already created Conduit (optional); otherwiseTwitchConduitSocketPoolwill create a new Conduit.The ID of an already created Conduit (optional); otherwiseTwitchConduitSocketPoolwill create a new Conduit.booleanAn optionalEventManager(if one is already created).eventManager(@Nullable EventManager eventManager) An optionalEventManager(if one is already created).executor()An optionalScheduledThreadPoolExecutor.executor(@Nullable ScheduledThreadPoolExecutor executor) An optionalScheduledThreadPoolExecutor.inthashCode()helix()An optionalTwitchHelixinstance (if one is already created).helix(@Nullable TwitchHelix helix) An optionalTwitchHelixinstance (if one is already created).intThe number of websockets that should be created by theTwitchConduitSocketPoolinstance.poolShards(int poolShards) The number of websockets that should be created by theTwitchConduitSocketPoolinstance.static @NotNull ConduitSpecprocess(@NotNull Consumer<ConduitSpec> spec) Optional: the proxy to use for helix requests and the websocket connections.proxyConfig(@Nullable ProxyConfig proxyConfig) Optional: the proxy to use for helix requests and the websocket connections.intAn integer offset for the Shard IDs to be registered with the Conduit.shardOffset(int shardOffset) An integer offset for the Shard IDs to be registered with the Conduit.The amount of time to wait for the websocket shards to be welcomed by Twitch.socketWelcomeTimeout(@Nullable Duration socketWelcomeTimeout) The amount of time to wait for the websocket shards to be welcomed by Twitch.toString()The total number of shards associated with the Conduit ID (optional).totalShardCount(@Nullable Integer totalShardCount) The total number of shards associated with the Conduit ID (optional).voidvalidate()
-
Method Details
-
validate
public void validate() -
process
-
conduitId
The ID of an already created Conduit (optional); otherwiseTwitchConduitSocketPoolwill create a new Conduit. -
poolShards
public int poolShards()The number of websockets that should be created by theTwitchConduitSocketPoolinstance.Must be positive.
-
totalShardCount
The total number of shards associated with the Conduit ID (optional).If the Conduit is already created, specifying this value avoids a
TwitchHelix.getConduits(String)call.If the Conduit is not created yet, this field can be used to create a larger Conduit than
poolShards()(if you plan to create anotherTwitchConduitSocketPoolinstance on another server). -
shardOffset
public int shardOffset()An integer offset for the Shard IDs to be registered with the Conduit.This field should only be set if the Conduit is already created with some shards already registered.
-
clientId
Your application's client ID.Not required if
appAccessToken()is specified orhelix()already has client credentials. -
clientSecret
Your application's client secret.Not required if
appAccessToken()is specified orhelix()already has client credentials. -
helix
An optionalTwitchHelixinstance (if one is already created). -
appAccessToken
The app access token for helix requests.Not required if client id and secret are specified OR the specified helix instance already has client credentials.
-
executor
An optionalScheduledThreadPoolExecutor. -
eventManager
An optionalEventManager(if one is already created).Prefer using
IEventSubConduit.getEventManager()(instead of creating anEventManager). -
proxyConfig
Optional: the proxy to use for helix requests and the websocket connections. -
socketWelcomeTimeout
The amount of time to wait for the websocket shards to be welcomed by Twitch.If a shard does not connect within this timeout,
ShardTimeoutExceptionis thrown byTwitchConduitSocketPool. -
conduitId
The ID of an already created Conduit (optional); otherwiseTwitchConduitSocketPoolwill create a new Conduit.- Returns:
this.
-
poolShards
The number of websockets that should be created by theTwitchConduitSocketPoolinstance.Must be positive.
- Returns:
this.
-
totalShardCount
The total number of shards associated with the Conduit ID (optional).If the Conduit is already created, specifying this value avoids a
TwitchHelix.getConduits(String)call.If the Conduit is not created yet, this field can be used to create a larger Conduit than
poolShards()(if you plan to create anotherTwitchConduitSocketPoolinstance on another server).- Returns:
this.
-
shardOffset
An integer offset for the Shard IDs to be registered with the Conduit.This field should only be set if the Conduit is already created with some shards already registered.
- Returns:
this.
-
clientId
Your application's client ID.Not required if
appAccessToken()is specified orhelix()already has client credentials.- Returns:
this.
-
clientSecret
Your application's client secret.Not required if
appAccessToken()is specified orhelix()already has client credentials.- Returns:
this.
-
helix
An optionalTwitchHelixinstance (if one is already created).- Returns:
this.
-
appAccessToken
The app access token for helix requests.Not required if client id and secret are specified OR the specified helix instance already has client credentials.
- Returns:
this.
-
executor
An optionalScheduledThreadPoolExecutor.- Returns:
this.
-
eventManager
An optionalEventManager(if one is already created).Prefer using
IEventSubConduit.getEventManager()(instead of creating anEventManager).- Returns:
this.
-
proxyConfig
Optional: the proxy to use for helix requests and the websocket connections.- Returns:
this.
-
socketWelcomeTimeout
The amount of time to wait for the websocket shards to be welcomed by Twitch.If a shard does not connect within this timeout,
ShardTimeoutExceptionis thrown byTwitchConduitSocketPool.- Returns:
this.
-
equals
-
hashCode
public int hashCode() -
toString
-