EventHandler - Reactor
Description
The ReactorEventHandler will process all events asynchronous in a thread-pool with at least 4 threads.
Check out the following class if you want to customize the parameters used when building a ReactorEventHandler instance:
Dependencies
- Gradle
- Gradle - Kotlin DSL
- Maven
build.gradle
dependencies {
implementation 'com.github.philippheuer.events4j:events4j-handler-reactor:0.12.2'
}
build.gradle.kts
dependencies {
implementation("com.github.philippheuer.events4j:events4j-handler-reactor:0.12.2")
}
pom.xml
<dependency>
<groupId>com.github.philippheuer.events4j</groupId>
<artifactId>events4j-handler-reactor</artifactId>
<version>0.12.2</version>
</dependency>
Set as default in Twitch4J and for eventManager.onEvent
- Java
- Kotlin
- Groovy
TwitchClient twitchClient = TwitchClientBuilder.builder()
.withDefaultEventHandler(ReactorEventHandler.class)
.build();
val twitchClient = TwitchClientBuilder.builder()
.withDefaultEventHandler(ReactorEventHandler::class.java)
.build();
def twitchClient = TwitchClientBuilder.builder()
.withDefaultEventHandler(ReactorEventHandler)
.build();