subscribe

abstract fun subscribe(className: String, callbackObject: EventHandler, onlyOnce: Boolean = false, identifier: String = UUID.randomUUID().toString())

Subscribes an event handler for an event class name.

Parameters

className

Class name of the events to listen to

callbackObject

Instance which needs to be called when the event occurs

onlyOnce

If true, the event handler will be removed after the first event

identifier

UUID of the listener


abstract fun subscribe(eventName: BlueConicEventManager.EventName, callbackObject: EventHandler, onlyOnce: Boolean = false, identifier: String = UUID.randomUUID().toString())

Subscribes an event handler for an event type.

Parameters

eventName

Class name of the events to listen to

callbackObject

Instance which needs to be called when the event occurs

onlyOnce

If true, the event handler will be removed after the first event

identifier

UUID of the listener