Class ConduitSpec
-
Method Summary
Modifier and TypeMethodDescription@Nullable com.github.philippheuer.credentialmanager.domain.OAuth2CredentialThe app access token for helix requests.appAccessToken(@Nullable com.github.philippheuer.credentialmanager.domain.OAuth2Credential appAccessToken) The app access token for helix requests.@Nullable StringclientId()Your application's client ID.Your application's client ID.@Nullable StringYour application's client secret.clientSecret(@Nullable String clientSecret) Your application's client secret.@Nullable StringThe 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.boolean@Nullable com.github.philippheuer.events4j.core.EventManagerAn optionalEventManager(if one is already created).eventManager(@Nullable com.github.philippheuer.events4j.core.EventManager eventManager) An optionalEventManager(if one is already created).@Nullable ScheduledThreadPoolExecutorexecutor()An optionalScheduledThreadPoolExecutor.executor(@Nullable ScheduledThreadPoolExecutor executor) An optionalScheduledThreadPoolExecutor.inthashCode()@Nullable TwitchHelixhelix()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) @Nullable ProxyConfigOptional: 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.@Nullable DurationThe 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()@Nullable IntegerThe 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
@Nullable public @Nullable com.github.philippheuer.credentialmanager.domain.OAuth2Credential 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
@Nullable public @Nullable com.github.philippheuer.events4j.core.EventManager 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
public ConduitSpec appAccessToken(@Nullable @Nullable com.github.philippheuer.credentialmanager.domain.OAuth2Credential 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
public ConduitSpec eventManager(@Nullable @Nullable com.github.philippheuer.events4j.core.EventManager 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
-