Skip to content
This repository was archived by the owner on Dec 18, 2022. It is now read-only.

Commit 9713494

Browse files
committed
update Builder method for setting eventBroadcaster to accept the new class type
1 parent 74d1949 commit 9713494

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

topl-service/src/main/java/io/matthewnelson/topl_service/TorServiceController.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ import io.matthewnelson.topl_service.service.components.binding.BaseServiceConne
7979
import io.matthewnelson.topl_service.service.components.actions.ServiceActionProcessor
8080
import io.matthewnelson.topl_service.service.components.actions.ServiceActions
8181
import io.matthewnelson.topl_service.service.components.binding.TorServiceConnection
82+
import io.matthewnelson.topl_service.service.components.onionproxy.TorServiceEventBroadcaster
8283
import io.matthewnelson.topl_service.util.ServiceConsts
8384

8485
class TorServiceController private constructor(): ServiceConsts() {
@@ -134,7 +135,7 @@ class TorServiceController private constructor(): ServiceConsts() {
134135
private val geoip6AssetPath: String
135136
) {
136137

137-
private var appEventBroadcaster: EventBroadcaster? = Companion.appEventBroadcaster
138+
private var appEventBroadcaster: TorServiceEventBroadcaster? = Companion.appEventBroadcaster
138139
// private var heartbeatTime = BackgroundManager.heartbeatTime
139140
private var restartTorDelayTime = ServiceActionProcessor.restartTorDelayTime
140141
private var stopServiceDelayTime = ServiceActionProcessor.stopServiceDelayTime
@@ -240,7 +241,7 @@ class TorServiceController private constructor(): ServiceConsts() {
240241
* NOTE: You will, ofc, have to cast [Companion.appEventBroadcaster] as whatever your
241242
* class actually is.
242243
* */
243-
fun setEventBroadcaster(eventBroadcaster: EventBroadcaster): Builder {
244+
fun setEventBroadcaster(eventBroadcaster: TorServiceEventBroadcaster): Builder {
244245
this.appEventBroadcaster = eventBroadcaster
245246
return this
246247
}
@@ -306,7 +307,7 @@ class TorServiceController private constructor(): ServiceConsts() {
306307
* Where everything needed to interact with [TorService] resides.
307308
* */
308309
companion object {
309-
var appEventBroadcaster: EventBroadcaster? = null
310+
var appEventBroadcaster: TorServiceEventBroadcaster? = null
310311
private set
311312

312313
/**

0 commit comments

Comments
 (0)